/* ============================================================
   POPUP FORMS — Glassmorphism Modal System
   ============================================================ */

/* ── BACKDROP OVERLAY ──────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ── POPUP FORM MODAL ──────────────────────────────────────── */
.popup-form-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  pointer-events: none;
}

.popup-form-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* ── GLASSMORPHISM FORM CONTAINER ──────────────────────────── */
.popup-form-container {
  background: rgba(10, 10, 10, 0.12);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 40px;
  max-width: 480px;
  width: calc(100% - 40px);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

/* ── CLOSE BUTTON ──────────────────────────────────────────── */
.popup-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  transition: all 0.3s ease;
  z-index: 10;
}

.popup-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── FORM HEADER ──────────────────────────────────────────── */
.popup-form-header {
  margin-bottom: 30px;
  margin-top: -10px;
}

.popup-form-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.popup-form-header p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* ── FORM FIELDS ──────────────────────────────────────────── */
.popup-form-group {
  margin-bottom: 16px;
}

.popup-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.popup-form-group input,
.popup-form-group select,
.popup-form-group textarea {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.popup-form-group input::placeholder,
.popup-form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.popup-form-group input:focus,
.popup-form-group select:focus,
.popup-form-group textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

/* ── FORM VALIDATION ──────────────────────────────────────── */
.popup-form-group input.error,
.popup-form-group textarea.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.08);
}

.popup-form-group input.error:focus,
.popup-form-group textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ── CHARACTER COUNTER ──────────────────────────────────────── */
.popup-char-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
  text-align: right;
}

/* ── TWO COLUMN LAYOUT ─────────────────────────────────────── */
.popup-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.popup-form-row .popup-form-group {
  margin-bottom: 0;
}

/* ── SUBMIT BUTTON ─────────────────────────────────────────── */
.popup-submit-btn {
  width: 100%;
  padding: 12px 24px;
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(37, 99, 235, 0.8) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: white;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.popup-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 1) 0%, rgba(37, 99, 235, 1) 100%);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.popup-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── SECTION-SPECIFIC BUTTON COLORS ────────────────────────── */
.popup-form-modal.contact .popup-submit-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(37, 99, 235, 0.8) 100%);
  border-color: rgba(59, 130, 246, 0.3);
}

.popup-form-modal.contact .popup-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 1) 0%, rgba(37, 99, 235, 1) 100%);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.popup-form-modal.virtual-office .popup-submit-btn {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.8) 0%, rgba(124, 58, 237, 0.8) 100%);
  border-color: rgba(139, 92, 246, 0.3);
}

.popup-form-modal.virtual-office .popup-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 1) 0%, rgba(124, 58, 237, 1) 100%);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.popup-form-modal.startup-incubation .popup-submit-btn {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.8) 0%, rgba(219, 39, 119, 0.8) 100%);
  border-color: rgba(236, 72, 153, 0.3);
}

.popup-form-modal.startup-incubation .popup-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(236, 72, 153, 1) 0%, rgba(219, 39, 119, 1) 100%);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3);
}

.popup-form-modal.pricing .popup-submit-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.8) 0%, rgba(5, 150, 105, 0.8) 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

.popup-form-modal.pricing .popup-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 1) 0%, rgba(5, 150, 105, 1) 100%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.popup-form-modal.general .popup-submit-btn {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(79, 70, 229, 0.8) 100%);
  border-color: rgba(99, 102, 241, 0.3);
}

.popup-form-modal.general .popup-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(99, 102, 241, 1) 0%, rgba(79, 70, 229, 1) 100%);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

/* ── SUCCESS MESSAGE ──────────────────────────────────────── */
.popup-success-message {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: rgba(16, 185, 129, 0.9);
  display: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.popup-success-message.show {
  display: block;
  animation: successFadeIn 0.3s ease;
}

@keyframes successFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.popup-success-message h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.popup-success-message p {
  margin: 0 0 16px 0;
  font-size: 13px;
  opacity: 0.9;
}

.popup-success-message button {
  padding: 10px 20px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: inherit;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.popup-success-message button:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: rgba(16, 185, 129, 0.6);
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .popup-form-container {
    max-width: 100%;
    width: 100%;
    padding: 30px 20px;
    border-radius: 16px;
  }

  .popup-form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .popup-form-header h2 {
    font-size: 20px;
  }

  .popup-close-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
}

/* ── SCROLLBAR STYLING ─────────────────────────────────────── */
.popup-form-container::-webkit-scrollbar {
  width: 6px;
}

.popup-form-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.popup-form-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.popup-form-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}
