/* ========================================
   GOOGLE CMP - CONSENT MANAGEMENT PLATFORM
   ======================================== */

/* CMP Consent Banner - Simple 2-button design */
.cmp-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
  padding: 1.5rem;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
  z-index: 999;
  font-size: 0.9rem;
  line-height: 1.6;
  border-top: 3px solid #FF9933;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cmp-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cmp-message {
  flex: 1;
  min-width: 250px;
}

.cmp-message h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #FF9933;
  font-weight: 700;
}

.cmp-message p {
  margin: 0;
  font-size: 0.85rem;
  color: #ddd;
}

.cmp-message a {
  color: #FF9933;
  text-decoration: none;
  font-weight: 600;
}

.cmp-message a:hover {
  text-decoration: underline;
}

/* CMP Action Buttons - 2 main choices */
.cmp-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 250px;
  justify-content: flex-end;
  align-items: center;
}

.cmp-btn {
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Primary: Accept/Consent Button */
.cmp-btn-consent {
  background: linear-gradient(135deg, #FF9933 0%, #E68A1E 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 153, 51, 0.3);
}

.cmp-btn-consent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 153, 51, 0.4);
}

.cmp-btn-consent:active {
  transform: translateY(0);
}

/* Secondary: Manage Button */
.cmp-btn-manage {
  background: transparent;
  color: #FF9933;
  border: 2px solid #FF9933;
}

.cmp-btn-manage:hover {
  background: rgba(255, 153, 51, 0.1);
  border-color: #FFB366;
}

.cmp-btn-manage:active {
  background: rgba(255, 153, 51, 0.2);
}

/* Hidden State */
.cmp-consent-banner.hidden {
  display: none;
}

/* ========================================
   CMP PREFERENCE CENTER / MODAL
   ======================================== */

.cmp-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cmp-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.cmp-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: white;
  color: #333;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  animation: modalSlideIn 0.3s ease forwards;
}

@keyframes modalSlideIn {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
  }
}

.cmp-modal.hidden {
  display: none;
}

.cmp-modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #eee;
}

.cmp-modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #1a1a1a;
}

.cmp-modal-body {
  padding: 2rem;
}

.cmp-preference-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.cmp-preference-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cmp-preference-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cmp-preference-label {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.95rem;
}

.cmp-toggle-switch {
  width: 50px;
  height: 28px;
  background: #ccc;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease;
  padding: 0;
}

.cmp-toggle-switch.active {
  background: #FF9933;
}

.cmp-toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: left 0.3s ease;
}

.cmp-toggle-switch.active::after {
  left: 25px;
}

.cmp-preference-desc {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
  line-height: 1.4;
}

.cmp-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #eee;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.cmp-modal-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cmp-modal-btn-cancel {
  background: #f0f0f0;
  color: #333;
}

.cmp-modal-btn-cancel:hover {
  background: #e0e0e0;
}

.cmp-modal-btn-save {
  background: #FF9933;
  color: white;
}

.cmp-modal-btn-save:hover {
  background: #E68A1E;
}

/* ========================================
   CONTACT FORM & RESPONSIVE STYLES
   ======================================== */

  .gdpr-btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .gdpr-consent-banner {
    padding: 0.75rem;
    max-height: 400px;
  }

  .gdpr-text h4 {
    font-size: 0.9rem;
  }

  .gdpr-text p {
    font-size: 0.8rem;
  }

  .gdpr-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .gdpr-close {
    font-size: 1.2rem;
  }
}

/* ========================================
   CONTACT FORM STYLES
   ======================================== */

.contact-form-section {
  background: linear-gradient(135deg, rgba(255, 153, 51, 0.05) 0%, rgba(19, 136, 8, 0.05) 100%);
  padding: 3rem 1.5rem;
  border-radius: 15px;
  margin: 2rem 0;
}

.contact-form-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form-wrapper h3 {
  text-align: center;
  color: var(--saffron);
  margin-bottom: 0.5rem;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.contact-form-wrapper .subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.form-group label .required {
  color: #FF9933;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
  color: #333;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #FF9933;
  box-shadow: 0 0 8px rgba(255, 153, 51, 0.2);
  background: #fffaf5;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  font-family: 'Baloo 2', sans-serif;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group-row .form-group {
  margin-bottom: 1rem;
}

@media (max-width: 480px) {
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.form-checkbox-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.form-checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.35rem;
  cursor: pointer;
}

.form-checkbox-group label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  font-size: 0.9rem;
}

.form-checkbox-group a {
  color: #FF9933;
  text-decoration: none;
}

.form-checkbox-group a:hover {
  text-decoration: underline;
}

/* Form Buttons */
.form-button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.form-btn {
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
}

.form-btn-submit {
  background: linear-gradient(135deg, #FF9933 0%, #FFD700 100%);
  color: white;
  border: 2px solid transparent;
}

.form-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 153, 51, 0.3);
}

.form-btn-submit:active {
  transform: translateY(0);
}

.form-btn-reset {
  background: transparent;
  color: #FF9933;
  border: 2px solid #FF9933;
}

.form-btn-reset:hover {
  background: #FF9933;
  color: white;
}

/* Form Messages */
.form-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: none;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.form-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
  display: block;
}

/* Form Field Error State */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: #dc3545;
  background: #fff5f5;
}

.form-group.error .error-message {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

/* Loading State */
.form-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.form-btn.loading::after {
  content: ' ...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% {
    content: ' .';
  }
  40% {
    content: ' ..';
  }
  60%, 100% {
    content: ' ...';
  }
}

/* Success Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-success-animation {
  animation: slideDown 0.5s ease-out;
}

/* Mobile Contact Form */
@media (max-width: 768px) {
  .contact-form-section {
    padding: 2rem 1rem;
    margin: 1.5rem 0;
  }

  .contact-form-wrapper .subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
  }

  .form-button-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-btn {
    width: 100%;
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .contact-form-section {
    padding: 1.5rem 0.75rem;
    margin: 1rem 0;
    border-radius: 10px;
  }

  .contact-form-wrapper h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }

  .contact-form-wrapper .subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.6rem 0.75rem;
    font-size: 16px; /* Prevents auto-zoom on iOS */
    border-radius: 6px;
  }

  .form-button-group {
    margin-top: 1.5rem;
  }

  .form-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Mobile CMP Consent Banner */
@media (max-width: 768px) {
  .cmp-consent-banner {
    padding: 1rem;
    bottom: 0;
  }

  .cmp-content {
    gap: 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .cmp-message {
    min-width: unset;
  }

  .cmp-actions {
    justify-content: stretch;
    flex-direction: column;
    min-width: unset;
  }

  .cmp-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
  }
}

/* Mobile CMP Preference Modal */
@media (max-width: 600px) {
  .cmp-modal {
    max-width: 95%;
    max-height: 90vh;
  }

  .cmp-modal-header {
    padding: 1.5rem 1.5rem 1rem;
  }

  .cmp-modal-header h2 {
    font-size: 1.1rem;
  }

  .cmp-modal-body {
    padding: 1.5rem;
  }

  .cmp-preference-header {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .cmp-toggle-switch {
    align-self: flex-start;
  }

  .cmp-modal-footer {
    flex-direction: column;
    padding: 1rem 1.5rem;
  }

  .cmp-modal-btn {
    width: 100%;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .cmp-btn:hover {
    transform: none;
  }

  .cmp-consent-banner {
    animation: none;
  }

  .cmp-modal {
    animation: none;
  }

  .form-btn-submit:hover {
    transform: none;
  }

  .form-message,
  .form-success-animation {
    animation: none;
  }
}
