/**
 * Contact Modal Styles
 * 
 * @package AirBayTech
 * @since 1.0.0
 */

/* Modal Overlay */
.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

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

/* Modal Container */
.contact-modal {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.contact-modal-overlay.active .contact-modal {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.contact-modal-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
}

.contact-modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-modal-header p {
  margin: 0.5rem 0 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Close Button */
.contact-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.contact-modal-close:hover {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  transform: rotate(90deg);
}

/* Modal Body */
.contact-modal-body {
  padding: 2rem;
}

/* Form Styles */
.contact-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.modal-form-group label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.modal-form-group label .required {
  color: #f44336;
  margin-left: 2px;
}

.modal-form-group input,
.modal-form-group select,
.modal-form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.modal-form-group input:focus,
.modal-form-group select:focus,
.modal-form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-form-group input::placeholder,
.modal-form-group textarea::placeholder {
  color: var(--text-muted);
}

.modal-form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.modal-form-group select {
  cursor: pointer;
}

/* Submit Button */
/* reCAPTCHA styling */
.modal-form-group .g-recaptcha {
  display: flex;
  justify-content: center;
  margin: var(--spacing-md) 0;
}

.modal-form-group .g-recaptcha > div {
  margin: 0 auto;
}

.contact-modal-submit {
  width: 100%;
  padding: 1rem;
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.contact-modal-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.contact-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form Messages */
.modal-form-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  animation: slideInDown 0.3s ease;
}

.modal-form-message.success {
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid #4caf50;
  color: #4caf50;
}

.modal-form-message.error {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid #f44336;
  color: #f44336;
}

.modal-form-message i {
  font-size: 1.2rem;
}

/* Loading State */
.contact-modal-submit.loading {
  position: relative;
  color: transparent;
}

.contact-modal-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* Responsive */
@media (max-width: 768px) {
  .contact-modal {
    max-width: 100%;
    margin: 0;
    border-radius: 12px;
  }
  
  .contact-modal-header,
  .contact-modal-body {
    padding: 1.5rem;
  }
  
  .contact-modal-header h2 {
    font-size: 1.5rem;
  }
}

/* Scrollbar Styles */
.contact-modal::-webkit-scrollbar {
  width: 8px;
}

.contact-modal::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.contact-modal::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.contact-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

