/* ContactHostMessaging.css - Exact styling from Bubble component */

/* Screen reader only - for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Modal Overlay */
.contact-host-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Contact Host Modal Container */
.contact-host-modal {
  position: relative;
  width: 328px;
  max-height: 90vh;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 16px;
  padding: 24px 20px;
  font-family: 'DM Sans', Arial, sans-serif;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  animation: slideUp 0.3s ease-out;
}

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

/* Custom scrollbar for modal */
.contact-host-modal::-webkit-scrollbar {
  width: 8px;
}

.contact-host-modal::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.contact-host-modal::-webkit-scrollbar-thumb {
  background: #6B6B6B;
  border-radius: 4px;
}

.contact-host-modal::-webkit-scrollbar-thumb:hover {
  background: #4A4A4A;
}

/* Close Button */
.btn-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #4A4A4A;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 10;
}

.btn-close:hover {
  background-color: #F5F5F5;
  color: #000000;
}

.btn-close:focus {
  outline: 2px solid #6D31C2;
  outline-offset: 2px;
}

.btn-close:active {
  background-color: #E0E0E0;
}

/* Form Header */
.form-header {
  text-align: center;
  margin-bottom: 24px;
}

.form-header .icon {
  font-size: 32px;
  display: inline-block;
  margin-bottom: 12px;
}

.form-header h2 {
  font-size: 18px;
  font-weight: 500;
  color: #4A4A4A;
  margin: 0 0 8px 0;
  line-height: 1.4;
  padding: 0 20px;
}

.form-header .subject {
  font-size: 14px;
  color: #6B6B6B;
  margin: 0;
  line-height: 1.5;
  padding: 0 10px;
}

/* Logged In Status */
.logged-in-status {
  font-size: 14px;
  color: #6B6B6B;
  text-align: center;
  margin-bottom: 20px;
  padding: 8px;
  background-color: #F5F5F5;
  border-radius: 8px;
}

/* Form Groups */
.form-group {
  margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #D0D0D0;
  border-radius: 8px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: #4A4A4A;
  background-color: #FFFFFF;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9B9B9B;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #6D31C2;
  box-shadow: 0 0 0 3px rgba(109, 49, 194, 0.1);
}

.form-group input:disabled {
  background-color: #F5F5F5;
  cursor: not-allowed;
  color: #6B6B6B;
}

.form-group input.error,
.form-group textarea.error {
  border-color: #FF0000;
}

.form-group input.error:focus,
.form-group textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  max-height: 200px;
  line-height: 1.5;
}

/* Sign Up Link */
.signup-link {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #6D31C2;
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.signup-link:hover {
  text-decoration: underline;
  color: #5A28A3;
}

.signup-link:focus {
  outline: 2px solid #6D31C2;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Error Messages */
.error-text {
  display: block;
  color: #FF0000;
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.3;
}

.error-banner {
  background-color: #FFE5E5;
  color: #FF0000;
  padding: 12px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 14px;
  border-left: 4px solid #FF0000;
  line-height: 1.4;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 0;
  background-color: #6D31C2;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover:not(:disabled) {
  background-color: #5A28A3;
}

.btn-primary:focus {
  outline: 2px solid #6D31C2;
  outline-offset: 3px;
}

.btn-primary:active:not(:disabled) {
  background-color: #4A1F85;
  transform: scale(0.98);
}

.btn-primary:disabled {
  background-color: #B8A0D9;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-secondary {
  width: 100%;
  padding: 0;
  background-color: transparent;
  color: #6D31C2;
  border: 2px solid #6D31C2;
  border-radius: 10px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background-color: #F5F0FF;
  border-color: #5A28A3;
  color: #5A28A3;
}

.btn-secondary:focus {
  outline: 2px solid #6D31C2;
  outline-offset: 3px;
}

.btn-secondary:active {
  background-color: #E8DCFF;
  transform: scale(0.98);
}

/* Success View */
.success-view {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 64px;
  height: 64px;
  background-color: #4CAF50;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  margin: 0 auto 24px auto;
  animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-view h3 {
  font-size: 24px;
  font-weight: 500;
  color: #4A4A4A;
  margin: 0 0 16px 0;
}

.success-view p {
  font-size: 16px;
  color: #6B6B6B;
  margin: 0 0 32px 0;
  line-height: 1.5;
}

/* Provide Email View */
.provide-email-view {
  padding: 20px 0;
}

.provide-email-view h3 {
  font-size: 18px;
  font-weight: 500;
  color: #4A4A4A;
  text-align: center;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.provide-email-view p {
  font-size: 14px;
  color: #6B6B6B;
  text-align: center;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.provide-email-view .info-text {
  margin-top: 16px;
  font-size: 12px;
  padding: 12px;
  background-color: #F5F5F5;
  border-radius: 8px;
  border-left: 4px solid #6D31C2;
}

/* Require Signup View */
.require-signup-view {
  padding: 20px 0;
}

.require-signup-view p {
  font-size: 14px;
  color: #6B6B6B;
  text-align: center;
  margin: 0 0 24px 0;
  line-height: 1.5;
  padding: 12px;
  background-color: #F5F5F5;
  border-radius: 8px;
  border-left: 4px solid #6D31C2;
}

/* Responsive Design */
@media (max-width: 480px) {
  .contact-host-modal {
    width: calc(100vw - 32px);
    max-width: 328px;
    margin: 16px;
  }

  .form-header h2 {
    font-size: 16px;
    padding: 0 10px;
  }

  .form-header .subject {
    font-size: 13px;
  }

  .btn-primary,
  .btn-secondary {
    font-size: 16px;
  }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
  .contact-host-overlay {
    padding: 20px;
  }

  .contact-host-modal {
    max-height: 85vh;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .contact-host-modal {
    border: 2px solid #000000;
  }

  .form-group input,
  .form-group textarea {
    border: 2px solid #000000;
  }

  .btn-primary {
    border: 2px solid #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .contact-host-overlay,
  .contact-host-modal,
  .success-icon {
    animation: none;
  }

  .btn-primary,
  .btn-secondary,
  .form-group input,
  .form-group textarea {
    transition: none;
  }
}

/* Print styles */
@media print {
  .contact-host-overlay {
    position: relative;
    background: transparent;
  }

  .contact-host-modal {
    border: 1px solid #000000;
    box-shadow: none;
  }

  .btn-close {
    display: none;
  }
}
