/**
 * Vocabulary Selection Modal Styles
 */

.vs-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 11000; /* Above most other modals */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-family: 'Bangers', cursive, Arial, sans-serif;
}

.vs-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.vs-modal-content {
  background: #2c3e50;
  color: #ecf0f1;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 4px solid #34495e;
}

.vs-modal-header {
  padding: 20px;
  background: #34495e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #2c3e50;
}

.vs-modal-title {
  margin: 0;
  font-size: 2.5rem;
  color: #f1c40f;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.vs-modal-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.vs-select-all-label {
  font-size: 1.3rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.vs-select-all-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #ffd54a;
}

.vs-random-btn {
  background: #f39c12;
  color: white;
  font-size: 1.2rem;
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Bangers', cursive, Arial, sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 4px 0 #d68910;
}

.vs-random-btn:hover {
  background: #f5b041;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #d68910;
}

.vs-random-btn:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #d68910;
}

.vs-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.vs-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.vs-item-card {
  background: #34495e;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  position: relative;
}

.vs-item-card:hover {
  transform: translateY(-5px);
  border-color: #f1c40f;
}

.vs-item-label {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.vs-item-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 25px;
  height: 25px;
  z-index: 2;
  cursor: pointer;
}

.vs-item-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.vs-item-image {
  width: 100%;
  height: 120px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #2c3e50;
  border-radius: 4px;
  margin-bottom: 10px;
}

.vs-item-no-image {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2c3e50;
  color: #95a5a6;
  border-radius: 4px;
  margin-bottom: 10px;
  font-style: italic;
}

.vs-item-text {
  text-align: center;
  width: 100%;
}

.vs-item-word {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 5px;
}

.vs-item-definition {
  font-size: 0.9rem;
  color: #bdc3c7;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.vs-modal-footer {
  padding: 20px;
  background: #34495e;
  display: flex;
  justify-content: center;
  border-top: 2px solid #2c3e50;
}

.vs-btn {
  padding: 12px 30px;
  font-size: 1.5rem;
  font-family: 'Bangers', cursive, Arial, sans-serif;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vs-btn-primary {
  background: #27ae60;
  color: white;
  box-shadow: 0 4px 0 #1e8449;
}

.vs-btn-primary:hover {
  background: #2ecc71;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1e8449;
}

.vs-btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #1e8449;
}

/* Hide checkboxes and use background highlight when selected */
.vs-item-checkbox:checked + .vs-item-content {
  background: rgba(39, 174, 96, 0.2);
}

.vs-item-checkbox:checked ~ .vs-item-content {
  border-color: #27ae60;
}
