/* ========================================================================
   Contact Modal Styling - Professional Design
   ======================================================================== */

#contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

#contact-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  border: 1px solid rgba(0, 242, 255, 0.15);
  border-radius: 12px;
  padding: 32px;
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 25px 100px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 242, 255, 0.08);
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 242, 255, 0.1);
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.modal-close:hover {
  background: rgba(0, 242, 255, 0.12);
  color: #00f2ff;
}

.modal-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 20px;
  margin-top: 12px;
  line-height: 1.5;
  letter-spacing: 0.2px;
}

/* Form inside modal */
.modal-content .contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-content .form-row {
  margin-bottom: 18px;
}

.modal-content .form-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #00f2ff;
  margin-bottom: 7px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.modal-content .form-row input,
.modal-content .form-row textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 242, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.modal-content .form-row select {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 242, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300f2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 38px;
}

.modal-content .form-row select option {
  background: #1a1a2e;
  color: #fff;
  padding: 6px;
}

.modal-content .form-row input:focus,
.modal-content .form-row textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 242, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 242, 255, 0.1);
}

.modal-content .form-row select:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 242, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 242, 255, 0.1);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300f2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}

.modal-content .form-row input::placeholder,
.modal-content .form-row textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.modal-content .form-row textarea {
  resize: vertical;
  min-height: 95px;
}

.modal-content .form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

/* Turnstile widget styling */
.modal-content .form-row .cf-turnstile {
  margin: 10px 0 0 0;
  transform: scale(0.95);
  transform-origin: left;
}

/* Form buttons and status */
.modal-content .form-row[style*="display:flex"] {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 242, 255, 0.1);
}

.modal-content .btn-primary {
  background: linear-gradient(135deg, #00f2ff 0%, #00d9e8 100%);
  color: #0a0a0f;
  border: none;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  letter-spacing: 0.2px;
}

.modal-content .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 242, 255, 0.25);
}

.modal-content .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-content .btn-ghost {
  background: none;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 242, 255, 0.2);
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 14px;
}

.modal-content .btn-ghost:hover {
  background: rgba(0, 242, 255, 0.08);
  color: #00f2ff;
  border-color: rgba(0, 242, 255, 0.4);
}

#form-status {
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  border-left: 3px solid #10b981;
  display: inline-block;
}

.form-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 12px;
  line-height: 1.5;
  letter-spacing: 0.1px;
}

@media (max-width: 768px) {
  .modal-content {
    padding: 28px;
    border-radius: 12px;
  }

  .modal-title {
    font-size: 22px;
  }

  .modal-content .form-row-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .modal-content {
    padding: 24px;
    max-height: 95vh;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-header {
    margin-bottom: 8px;
  }

  .modal-description {
    margin-bottom: 16px;
  }

  .modal-content .form-row {
    margin-bottom: 14px;
  }

  .modal-content .form-row-split {
    gap: 12px;
  }
}

/* Scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 255, 0.25);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 255, 0.45);
}
