/* Popup Registration Modal Styles */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-container {
  position: relative;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background-image: url("../images/backgrounds/popup.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: popupSlideIn 0.4s ease-out;
  min-height: 800px;
  display: flex;
  flex-direction: column;
}

@keyframes popupSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.popup-content {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100%;
}

.popup-form-container {
  margin-top: auto;
  padding: 1.25rem 1.5rem;
  padding-top: 2rem;
  position: relative;
  background: transparent;
}

.popup-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 0 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  color: var(--color-text-light);
  font-size: var(--font-size-label);
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--color-primary);
  font-size: var(--font-size-input);
  font-family: "Roboto Mono", monospace;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: #e9c67a;
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(233, 198, 122, 0.4);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2339041c' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-select option {
  background-color: #ffffff;
  color: var(--color-primary);
  padding: 0.5rem;
}

.form-error {
  color: #ffd700;
  font-size: var(--font-size-tiny);
  margin-top: 0.125rem;
  display: none;
}

.form-group.error .form-error {
  display: block;
}

.form-group.error .form-input,
.form-group.error .form-select {
  border-color: #ffd700;
}

.popup-submit-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  margin-top: 0.25rem;
  background: linear-gradient(135deg, #f0d59d 0%, #fef9ec 45%, #e9c67a 100%);
  border: none;
  border-radius: 40px;
  color: var(--color-primary);
  font-size: var(--font-size-button);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(233, 198, 122, 0.8);
  font-family: "Roboto Mono", monospace;
}

.popup-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(233, 198, 122, 1);
}

.popup-submit-btn:active {
  transform: translateY(0);
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: var(--color-text-light);
  font-size: var(--font-size-h4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
  font-family: "Roboto Mono", monospace;
  line-height: 1;
}

.popup-close:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .popup-container {
    max-width: 95%;
    max-height: 95vh;
    min-height: 700px;
  }

  .popup-form-container {
    padding: 1rem 1.25rem;
    padding-top: 1.75rem;
  }

  .popup-form {
    gap: 0.75rem;
  }

  .form-label {
    font-size: var(--font-size-tiny);
  }

  .form-input,
  .form-select {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-xxs);
  }

  .popup-submit-btn {
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-xxs);
  }
}

@media (max-width: 480px) {
  .popup-container {
    max-width: 100%;
    border-radius: 0;
    max-height: 100vh;
    min-height: 700px;
  }

  .popup-form-container {
    padding: 0.875rem 1rem;
    padding-top: 1.5rem;
  }

  .popup-form {
    gap: 0.625rem;
  }

  .popup-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 35px;
    height: 35px;
    font-size: var(--font-size-h5);
  }
}
