/* GLS Contact Popup Styles */
/* Matches the styling of your React ContactDialog component */

/* Popup Overlay */
.gls-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}

/* Popup Content */
.gls-popup-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

@media (min-width: 768px) {
  .gls-popup-content {
    max-height: 85vh;
  }
}

/* Close Button */
.gls-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  color: #666;
  z-index: 1;
  transition: all 0.2s ease;
}

.gls-popup-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

/* Popup Header */
.gls-popup-header {
  padding: 24px 24px 0 24px;
  border-bottom: none;
}

.gls-popup-title {
  font-size: 24px;
  font-weight: 500;
  color: black;
  margin: 0;
  padding-right: 40px;
}

@media (min-width: 768px) {
  .gls-popup-title {
    font-size: 32px;
  }
}

/* Popup Body */
.gls-popup-body {
  padding: 24px;
}

/* Contact Form */
.gls-contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Form Row */
.gls-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .gls-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Form Group */
.gls-form-group {
  display: flex;
  flex-direction: column;
}

/* Form Labels */
.gls-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
}

@media (min-width: 768px) {
  .gls-form-label {
    font-size: 16px;
  }
}

/* Form Inputs */
.gls-form-input,
.gls-form-textarea {
  width: 100%;
  background: rgba(154, 154, 154, 0.2);
  border: 1px solid transparent;
  border-radius: 50px;
  padding: 14px 16px;
  font-size: 14px;
  color: black;
  outline: none;
  transition: all 0.2s ease;
}

.gls-form-textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 120px;
}

@media (min-width: 768px) {
  .gls-form-input,
  .gls-form-textarea {
    font-size: 16px;
  }
}

.gls-form-input::placeholder,
.gls-form-textarea::placeholder {
  color: #666;
  font-size: 12px;
}

@media (min-width: 768px) {
  .gls-form-input::placeholder,
  .gls-form-textarea::placeholder {
    font-size: 14px;
  }
}

.gls-form-input:focus,
.gls-form-textarea:focus {
  border-color: #E1251B;
  background: rgba(154, 154, 154, 0.15);
}

.gls-form-input.error,
.gls-form-textarea.error {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Checkbox */
.gls-form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
}

.gls-checkbox {
  width: 13px;
  height: 13px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 4px;
}

.gls-checkbox-label {
  font-size: 12px;
  line-height: 1.6;
  color: #666;
  cursor: pointer;
  margin: 0;
}

@media (min-width: 768px) {
  .gls-checkbox-label {
    font-size: 14px;
  }
}

/* Error Messages */
.gls-error-message {
  color: #EF4444;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.gls-error-message.show {
  display: block;
}

/* Submit Button */
.gls-form-submit {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .gls-form-submit {
    justify-content: flex-end;
  }
}

.gls-submit-btn {
  background: black;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 282px;
  outline: none;
}

@media (min-width: 768px) {
  .gls-submit-btn {
    font-size: 16px;
    width: 282px;
  }
}

.gls-submit-btn:hover {
  background: #3A3A3A;
  transform: translateY(-1px);
}

.gls-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Toast Notifications */
.gls-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  max-width: 400px;
  animation: slideInRight 0.3s ease;
}

.gls-toast-content {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  line-height: 1.5;
}

.gls-toast.success .gls-toast-content {
  border-left: 4px solid #10B981;
  color: #059669;
}

.gls-toast.error .gls-toast-content {
  border-left: 4px solid #EF4444;
  color: #DC2626;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.gls-toast.hide {
  animation: slideOutRight 0.3s ease forwards;
}

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

.gls-submit-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .gls-popup-content {
    margin: 16px;
    max-height: 90vh;
  }
  
  .gls-popup-header {
    padding: 20px 20px 0 20px;
  }
  
  .gls-popup-body {
    padding: 20px;
  }
  
  .gls-popup-title {
    font-size: 20px;
    padding-right: 36px;
  }
  
  .gls-toast {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

/* Prevent body scroll when popup is open */
body.gls-popup-open {
  overflow: hidden;
}
