/* ==========================================================================
   Rolex Official Retailer - Consent Management Platform (CMP) Styles
   Strictly isolated namespace to avoid affecting existing page styling
   ========================================================================== */

/* 1. Cookie Consent Banner (Page 24 Design) */
#rolex-cmp-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #ffffff;
  color: #212121;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  border-top: 1px solid #d5d1c8;
  z-index: 9999999;
  font-family: Arial, Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
  padding: 16px 24px;
  display: none;
  animation: rolexCmpFadeIn 0.3s ease-out;
}

#rolex-cmp-banner.rolex-cmp-visible {
  display: block;
}

#rolex-cmp-banner-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-sizing: border-box;
}

#rolex-cmp-banner-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: #333333;
  margin: 0;
  text-align: left;
}

#rolex-cmp-banner-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  min-width: 250px;
}

.rolex-cmp-btn-banner {
  background-color: #000000;
  color: #ffffff !important;
  border: 1px solid #000000;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  border-radius: 0;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  line-height: 1.2;
  outline: none;
  box-sizing: border-box;
  display: block;
  width: 100%;
}

.rolex-cmp-btn-banner:hover {
  background-color: #222222;
  color: #ffffff !important;
}

/* 2. Detailed Settings Modal (Page 25 Design) */
#rolex-cmp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000000;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 16px;
  animation: rolexCmpFadeIn 0.25s ease-out;
}

#rolex-cmp-modal-overlay.rolex-cmp-visible {
  display: flex;
}

#rolex-cmp-modal-card {
  background: #ffffff;
  color: #212121;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid #e0ded9;
  box-sizing: border-box;
  padding: 28px 24px;
  position: relative;
  font-family: Arial, Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}

#rolex-cmp-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 26px;
  line-height: 1;
  color: #666666;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

#rolex-cmp-modal-close:hover {
  color: #000000;
}

.rolex-cmp-logo-wrap {
  text-align: center;
  width: 100%;
  margin-bottom: 16px;
}

.rolex-cmp-retailer-img {
  max-height: 46px;
  max-width: 150px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

#rolex-cmp-modal-description {
  font-size: 11.5px;
  line-height: 1.45;
  color: #444444;
  margin-bottom: 20px;
  text-align: justify;
}

/* Category Toggle Rows */
.rolex-cmp-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #dfdcd5;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: #faf9f6;
  box-sizing: border-box;
}

.rolex-cmp-category-label {
  font-size: 13px;
  font-weight: 600;
  color: #111111;
}

/* iOS/Material Switch */
.rolex-cmp-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
  flex-shrink: 0;
}

.rolex-cmp-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.rolex-cmp-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cccccc;
  transition: .3s;
  border-radius: 24px;
}

.rolex-cmp-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

input:checked + .rolex-cmp-slider {
  background-color: #006039;
}

input:focus + .rolex-cmp-slider {
  box-shadow: 0 0 1px #006039;
}

input:checked + .rolex-cmp-slider:before {
  transform: translateX(20px);
}

/* Disabled Switch for Essential */
input:disabled + .rolex-cmp-slider {
  background-color: #92b8a4;
  cursor: not-allowed;
}

.rolex-cmp-more-options {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #333333;
  margin: 12px 0 16px 0;
  text-decoration: none;
  letter-spacing: 0.5px;
  cursor: pointer;
}

/* Modal Bottom Buttons */
.rolex-cmp-modal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.rolex-cmp-modal-btn {
  flex: 1;
  background-color: #000000;
  color: #ffffff !important;
  border: 1px solid #000000;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 10px 4px;
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none !important;
  border-radius: 0;
  transition: background-color 0.2s ease;
  line-height: 1.2;
  box-sizing: border-box;
}

.rolex-cmp-modal-btn:hover {
  background-color: #2b2b2b;
}

/* ==========================================================================
   3. Rolex Official Legal Footer Bar & Back to Top Spacing
   ========================================================================== */
.site-footer {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.back-to-top-wrapper,
.site-footer .back-to-top-wrapper {
  padding-bottom: 26px !important;
  margin-bottom: 0 !important;
}

.rolex-footer-legal {
  background-color: #111111 !important;
  border-top: 1px solid #262626 !important;
  width: 100% !important;
  padding: 14px 20px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 22px !important;
  flex-wrap: wrap !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  z-index: 100;
  position: relative;
}

.rolex-footer-legal a {
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  font-family: Arial, Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  transition: opacity 0.2s ease, color 0.2s ease !important;
  display: inline-block !important;
  line-height: 1.4 !important;
  cursor: pointer !important;
}

.rolex-footer-legal a:hover {
  color: #a89968 !important;
  opacity: 0.9 !important;
}

.rolex-footer-legal-sep {
  color: #555555 !important;
  font-size: 11px !important;
  user-select: none !important;
  font-weight: 300 !important;
}

/* ==========================================================================
   4. Rolex Standardized Crown Logo (Matching oyster-story.html)
   ========================================================================== */
.site-footer .footer-crown {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-end !important;
  height: 32px !important;
  padding: 50px 0px !important;
  box-sizing: content-box !important;
}

.site-footer .footer-crown img,
.site-footer .footer-crown .logo,
.site-footer .site-logo img {
  height: 40px !important;
  width: 60px !important;
  max-height: 40px !important;
  max-width: 60px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Animations */
@keyframes rolexCmpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 860px) {
  #rolex-cmp-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  #rolex-cmp-banner-buttons {
    width: 100%;
    min-width: unset;
  }

  .rolex-cmp-modal-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .rolex-footer-legal {
    gap: 10px 14px !important;
    padding: 14px 10px !important;
  }

  .rolex-footer-legal a {
    font-size: 10px !important;
    letter-spacing: 0.8px !important;
  }
}

/* Fix back to top */
a.back-to-top, .back-to-top-wrapper { padding-bottom: 26px !important; margin-bottom: 0 !important; }

/* User Requested Updates */
html { scroll-behavior: smooth !important; }
.rolex-footer-legal a:hover { color: #9bf9ce !important; transition: color 0.3s ease; }

.rolex-cmp-category-description {
  font-size: 11px;
  color: #666;
  padding: 5px 0 15px 0;
  margin-top: -5px;
  line-height: 1.4;
  display: none;
}
.rolex-cmp-more-options {
  cursor: pointer;
  display: inline-block;
  margin-bottom: 15px;
  font-weight: bold;
}

