/* Common styling for Contact, Privacy Policy & Terms of Use pages */

/* Header styling */
header {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 !important;
  padding: 8px 24px;
  position: relative;
  z-index: 10;
}

/* Header padding for non-homepage pages (connect, admin, etc.) */
body:not(.homepage) header {
  padding: 24px 24px 8px 24px;
}

header a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

header span {
  font-size: 20px;
  line-height: 20px;
  letter-spacing: -0.5px;
  color: var(--text-secondary);
  margin-left: 0px;
  font-weight: 500;
}

.header-logo {
  width: 20px;
  height: auto;
}

/* Body styling */
body {
  background-color: var(--bg-primary);
  padding-top: 15px;
}

/* Ensure legal pages don't have the additional background image */
body.legal-page {
  background-image: none !important;
}

/* Decoration image positioning */
.right-deco, .right-mobile-deco {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
}

.left-deco, .left-mobile-deco {
  position: absolute;
  left: 0;
  bottom: 0 !important;
  z-index: 1;
  pointer-events: none;
}

/* Set specific positioning for app view */
body.app-view .left-deco,
body.app-view .left-mobile-deco {
  bottom: 0 !important;
}

/* Mobile responsiveness for decorations */
@media screen and (max-width: 767px) {
  .right-deco, .left-deco {
    display: none;
  }
  
  .left-mobile-deco {
    bottom: 0 !important;
  }
  
  /* Adjust header padding for mobile */
  header {
    padding: 8px 16px;
  }
  
  /* Header padding for non-homepage pages on mobile */
  body:not(.homepage) header {
    padding: 16px 16px 8px 16px;
  }
}

/* App header specific styling */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
}

.app-logo {
  width: 20px;
  height: auto;
}

.app-close-button {
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin: 0;
  color: var(--text-secondary);
}

/* Ensure consistent header styling for all app views */
body.app-view header.app-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 20px 30px !important;
  position: relative !important;
  z-index: 10 !important;
}

body.app-view .app-logo {
  width: 20px !important;
  height: auto !important;
  display: block !important;
  margin: 0 !important;
}

body.app-view .app-close-button {
  font-size: 24px !important;
  cursor: pointer !important;
  color: var(--text-secondary) !important;
  text-align: right !important;
  line-height: 1 !important;
  z-index: 1000 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* App-specific styles */
body.app-view footer {
  display: none !important;
}

/* Container styling for all pages */
.privacy-container,
.terms-container,
.contact-container {
  display: flex;
  justify-content: center;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

/* Content styling for legal pages */
.privacy-content,
.terms-content,
.contact-form {
  background-color: var(--panel-bg);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 800px;
  position: relative;
  z-index: 5;
  margin-bottom: 60px;
}

/* Form styling specific to contact page */
.form-wrapper {
  width: 100%;
  max-width: 500px;
  padding: 20px 0;
  position: relative;
  z-index: 5;
}

/* Typography for legal pages */
.privacy-content h2,
.terms-content h2 {
  color: var(--text-primary);
  margin-bottom: 25px;
  text-align: center;
  width: 100%;
}

.privacy-content h3,
.terms-content h3 {
  color: var(--text-primary);
  margin-top: 30px;
  margin-bottom: 15px;
}

.privacy-content p,
.privacy-content ul,
.privacy-content li,
.terms-content p,
.terms-content ul,
.terms-content li {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 15px;
}

.privacy-content ul,
.terms-content ul {
  padding-left: 20px;
}

.privacy-content li,
.terms-content li {
  margin-bottom: 8px;
}

/* Contact form specific styling */
.form-wrapper .title {
  color: var(--text-primary);
  margin-bottom: 25px;
  text-align: center;
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
  z-index: 20;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 16px;
  position: relative;
  z-index: 20;
}

.required {
  color: #E65660;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 16px;
  color: var(--text-primary);
  background-color: var(--panel-bg);
  transition: border-color 0.2s ease;
  position: relative;
  z-index: 20;
}

.form-control:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

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

.file-input-container {
  margin-top: 5px;
  position: relative;
  z-index: 20;
}

.file-input {
  width: 100%;
  padding: 8px 0;
  color: var(--text-primary);
  position: relative;
  z-index: 20;
}

.file-input-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

.error-message-wrapper {
  margin-bottom: 20px;
  position: relative;
  z-index: 20;
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  position: relative;
  z-index: 20;
}

.submit-btn {
  background-color: #E65660;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
  z-index: 20;
}

.submit-btn:hover {
  background-color: #d44147;
}

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

/* Turnstile Container */
.turnstile-container {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

/* Ensure Cloudflare Turnstile is centered */
.cf-turnstile {
  margin: 0 auto;
  display: block !important;
}

/* Also center the iframe that Cloudflare generates */
.cf-turnstile iframe {
  margin: 0 auto !important;
  display: block !important;
}

/* Mobile responsiveness */
@media screen and (max-width: 767px) {
  .privacy-content,
  .terms-content,
  .contact-form {
    padding: 20px 15px;
  }
  
  .form-wrapper {
    padding: 10px;
    width: 100%;
  }
  
  .form-wrapper .title {
    font-size: 28px;
  }
  
  .form-group label {
    font-size: 15px;
  }
  
  .form-control {
    padding: 10px 12px;
  }
  
  .submit-btn {
    width: 100%;
  }
  
  .app-header {
    padding: 20px !important;
  }
  
  /* Fix for mobile tapping issues */
  .form-group {
    isolation: isolate; /* Create a new stacking context */
  }
  
  /* Ensure inputs receive touch events on mobile */
  input[type="text"],
  input[type="email"],
  textarea,
  .form-control {
    touch-action: manipulation; /* Improve touch behavior */
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* Remove tap highlight */
  }
}

/* Footer styling - with higher specificity to override conflicts */
body:not(.homepage) footer,
.legal-page footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  background-color: var(--panel-bg) !important;
  border-top: 1px solid #E2E8F0 !important;
  padding: 15px 30px !important;
  box-sizing: border-box !important;
  z-index: 10 !important;
  position: relative !important;
  text-align: left !important;
  margin: 0 !important;
}

body:not(.homepage) footer .copyright,
.legal-page footer .copyright {
  color: var(--text-secondary) !important;
  font-size: 14px !important;
}

body:not(.homepage) footer .footer-links,
.legal-page footer .footer-links {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 0 !important;
}

body:not(.homepage) footer .footer-links a,
.legal-page footer .footer-links a {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  margin-left: 20px !important;
  font-size: 14px !important;
  transition: color 0.2s ease !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

body:not(.homepage) footer .footer-links a:hover,
.legal-page footer .footer-links a:hover {
  color: var(--text-primary) !important;
  text-decoration: underline !important;
  border-bottom: none !important;
}

/* Mobile responsiveness for footer */
@media screen and (max-width: 767px) {
  body:not(.homepage) footer,
  .legal-page footer {
    flex-direction: column !important;
    padding: 15px !important;
  }
  
  body:not(.homepage) footer .copyright,
  .legal-page footer .copyright {
    margin-bottom: 10px !important;
    text-align: center !important;
  }
  
  body:not(.homepage) footer .footer-links,
  .legal-page footer .footer-links {
    justify-content: center !important;
  }
  
  body:not(.homepage) footer .footer-links a,
  .legal-page footer .footer-links a {
    margin: 0 10px !important;
  }
} 
