/* CSS Variables */
:root {
  --wedding-bg: linear-gradient(180deg, #faf8f5 0%, #f5f1eb 100%);
  --wedding-bg-solid: #f5f1eb; /* unify flat color to avoid gradient seam */
}

/* Base HTML and Body Styles */
html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
    font-family: 'Work Sans', sans-serif;
    background: #f5f1eb;
    min-height: 100vh; /* Fallback for older browsers */
    min-height: 100dvh; /* Dynamic viewport height for iOS Safari */
    text-align: center;
}

/* Universal box-sizing reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Hero Section - Full Viewport */
.hero-section {
  position: relative;
  width: 100%;
  height: calc(110vh - 60px); /* Taller to show more of the image */
  min-height: 700px;
  overflow: hidden;
  margin-top: 60px; /* Account for fixed header */
}

.hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden; /* Hide the extra height */
}

.hero-image {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
  object-fit: cover;
  object-position: center center;
  transition: transform 0.1s ease-out;
  will-change: transform; /* Optimize for parallax */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  z-index: 2;
  transition: background 0.3s ease;
}

.hero-content {
  position: absolute;
  bottom: calc((95vh - 60px) * 0.22); /* Position in bottom third of hero section */
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  color: #ffffff; /* Pure white for better contrast against dark overlay */
  opacity: 0; /* Hidden initially, shown after 2s inactivity */
  transition: opacity 0.3s ease;
  padding: 0 20px;
  width: 100%;
  max-width: 100%;
}

.hero-content.visible {
  opacity: 1;
}

.hero-title {
  font-size: 56px;
  font-weight: 300;
  margin: 0 0 15px 0;
  letter-spacing: 3px;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 0, 0, 0.3);
  font-family: 'Merriweather', serif;
  line-height: 1.2;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 28px;
  font-weight: 300;
  margin: 0;
  letter-spacing: 2px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 0, 0, 0.3);
  font-family: 'Work Sans', sans-serif;
  color: #ffffff;
  opacity: 1;
}

/* Scroll Down Arrow */
.scroll-down-arrow {
  position: absolute;
  bottom: calc((95vh - 60px) * 0.22 - 120px); /* Position just below hero content, accounting for text height */
  left: 50%;
  transform: translateX(-50%);
  z-index: 5; /* Higher than hero-content to ensure visibility */
  color: rgba(255, 255, 255, 1); /* Full white for maximum visibility */
  opacity: 0; /* Changed from 1 - hidden by default */
  transition: opacity 0.5s ease; /* Smooth fade */
  animation: bounce 2s infinite;
  cursor: pointer;
  pointer-events: none; /* Initially disabled */
}

.scroll-down-arrow.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-down-arrow svg {
  width: 120px;
  height: 120px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.scroll-down-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}


.sky-wrapper {
  position: relative;
  z-index: 2;
  padding-top: 0;
  background: var(--wedding-bg-solid);
  margin-top: 0;
}

/* Welcome Message Section */
.welcome-section {
  background: var(--wedding-bg-solid);
  padding: 22px 40px; /* Increased from 20px to 22px (10% increase) */
  text-align: center;
  position: relative;
  z-index: 2;
}

.welcome-embellishment-top,
.welcome-embellishment-bottom {
  display: flex;
  justify-content: center;
  margin: 0 auto 7px; /* Reduced from 12px to 7px (40% reduction) */
  opacity: 0.7;
}

.welcome-embellishment-bottom {
  margin: 7px auto 0; /* Reduced from 12px to 7px (40% reduction) */
}

/* Inline SVG sizing for welcome embellishments */
.welcome-embellishment-top svg,
.welcome-embellishment-bottom svg {
  width: 180px;
  height: 30px;
  opacity: 0.7;
}

.embellishment-flipped {
  transform: scaleY(-1); /* Flip the bottom embellishment vertically */
}

.welcome-message {
  max-width: 700px;
  margin: 0 auto;
}

.welcome-text {
  font-family: 'Merriweather', serif;
  font-size: 24px;
  line-height: 1.6; /* Reduced from 1.8 to 1.6 */
  color: #5a5a5a;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.5px;
  margin: 0;
}

/* Smooth transition from hero to gift cards */
.sky-wrapper {
  animation: fadeInUp 0.8s ease-out;
}

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

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .hero-section {
        height: 70vh;
        min-height: 400px;
        margin-top: 56px; /* Account for fixed header on mobile */
    }

    /* Layered hero image effect for mobile */
    .hero-image-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        background-image: var(--hero-bg-image);
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        filter: blur(15px);
        transform: scale(1.1); /* Slight scale to prevent blur edge artifacts */
    }

    .hero-image {
        width: 190%;
        /* max-width: 90%; */
        height: auto;
        max-height: 100%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        object-fit: contain;
        object-position: center center;
        position: absolute;
        z-index: 2; /* Above the blurred background */
    }

    .scroll-down-arrow {
        bottom: calc(90vh * 0.15 - 100px); /* Position just below hero content on mobile */
    }

    .scroll-down-arrow svg {
        width: 100px;
        height: 100px;
    }

    .hero-title {
        font-size: 40px;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .welcome-section {
        padding: 15px 20px; /* Increased from 14px to 15px (10% increase) */
    }

    .welcome-text {
        font-size: 20px;
        line-height: 1.5; /* Reduced from 1.7 to 1.5 */
    }

    .welcome-embellishment-top,
    .welcome-embellishment-bottom {
        margin: 0 auto 5px; /* Reduced from 8px to 5px (40% reduction) */
    }

    .welcome-embellishment-top svg,
    .welcome-embellishment-bottom svg {
        width: 150px;
        height: 22px;
    }

    .welcome-embellishment-bottom {
        margin: 5px auto 0; /* Reduced from 8px to 5px (40% reduction) */
    }

    .hero-content {
        padding: 0 15px;
        bottom: 15%;
    }

    .gift-list {
        padding: 40px 20px;
    }

    .sky-wrapper {
        padding-top: 40px !important;
        background: var(--wedding-bg-solid);
    }
}

/* Registry Page Specific Styles */

body.registry-page .content-wrapper {
    height: auto !important;
    overflow-y: visible !important;
    min-height: 100vh; /* Fallback for older browsers */
    min-height: 100dvh; /* Dynamic viewport height for iOS Safari */
}


body.registry-page .hero-section {
    margin-top: 60px;
}

/* Gift Card Styles - Image Card with Text Below */
.gift-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    gap: 20px;
    padding: 60px 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    justify-items: center;
}

.gift-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 224px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.gift-card-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 17px;
    -webkit-border-radius: 17px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    background-color: #e3dcd6;
    contain: paint;
    border: none;
    outline: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-clip-path: inset(0 round 17px);
    clip-path: inset(0 round 17px);
}

/* Make gift card image clickable when contributions are allowed */
.gift-card-image[onclick] {
    cursor: pointer;
}

/* Remove square tap highlight / focus ring on mobile */
.gift-card-image[onclick],
.gift-card-image:focus {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
}

.gift-card:focus,
.gift-card:focus-visible {
    outline: none;
}

/* Blurred backdrop effect - fills empty space */
.gift-card-image::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background-image: var(--gift-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(20px) brightness(1.1);
    opacity: 0.6;
    z-index: 0;
    border-radius: inherit;
}

/* Sharp product image on top */
.gift-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--gift-image);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
}

/* Ribbon positioning for reserved/gifted cards - same size as regular cards */
.gift-card-image .ribbon-wrapper {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 110px;
    height: 110px;
    overflow: hidden;
    z-index: 15; /* Above image but below button if present */
}

.gift-card-image .ribbon {
    width: 165px;
    left: -40px;
    top: 35px;
    font-size: 12px;
    padding: 8px 0;
}

.gift-card-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    outline: none;
    border: none;
}

.gift-card:hover {
    outline: none;
    border: none;
}

.gift-card-content {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
    width: 100%;
}

/* Card Title Price Container - Fixed 3-line height */
.card-title-price-container {
    height: 64.8px; /* Fixed height for exactly 3 lines: 18px × 1.2 × 3 */
    line-height: 1.2;
    font-size: 18px;
    margin-bottom: 12px;
    overflow: hidden;
}

/* Card Title - Matching contribution modal fonts */
.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #262e2e;
    letter-spacing: -0.48px;
    font-family: 'Work Sans', sans-serif;
    text-align: left;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Card User Count - Matching contribution modal fonts */
.card-user-count {
    color: #262e2e;
    padding: 0;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Work Sans', sans-serif;
    text-align: left;
    line-height: 1.2;
    margin: 0;
    display: block;
}

.card-user-count .attribute-value {
    font-family: 'Work Sans', sans-serif;
    font-size: 15px;
    color: #262e2e;
}

/* Card Progress Container - Matching host_home.html styles */
.card-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    min-height: 18px; /* Fixed height for exactly 1 line (progress bar height) */
}

/* Card Progress Bar - Matching host_home.html styles */
.card-progress-bar {
    flex: 0.9;
    min-width: 0;
    height: 18px;
    background-color: #e3dcd6;
    border-radius: 9px;
    overflow: hidden;
}

/* Card Progress Fill - Matching contribution modal pink color */
.card-progress-fill {
    height: 100%;
    background-color: #9b607c;
    border-radius: 9px;
    transition: width 0.3s ease;
}

/* Card Progress Fill - Yellow when fully funded */
.card-progress-fill.fully-funded {
    background-color: #E1B672;
}

/* Card Progress Text - Matching contribution modal fonts */
.card-progress-text {
    color: #262e2e;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Lato', sans-serif;
    flex-shrink: 0;
}

/* Card Progress Text - Bold when fully funded */
.card-progress-text.fully-funded {
    font-weight: 700;
}

/* Gift Card Contribute Button - Circular pink button with white arrow, bottom right */
.gift-card-contribute-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #9b607c;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
}

/* Show button on gift card hover */
.gift-card:hover .gift-card-contribute-btn,
.gift-card-image:hover .gift-card-contribute-btn {
    opacity: 1;
    visibility: visible;
}

/* Ensure button is visible for reserved gifts in completed section */
.gifted-cards-container .gift-card:hover .gift-card-contribute-btn,
.gifted-cards-container .gift-card-image:hover .gift-card-contribute-btn {
    opacity: 1;
    visibility: visible;
}

.gift-card-contribute-btn i {
    font-size: 21px;
    transition: color 0.2s ease;
}

.gift-card-contribute-btn:hover {
    background: white;
}

.gift-card-contribute-btn:hover i {
    color: #9b607c;
}

/* Gift Card View Product Button - Small circular button with external link icon, bottom left */
.gift-card-view-product-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #9b607c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Show button on gift card hover */
.gift-card:hover .gift-card-view-product-btn,
.gift-card-image:hover .gift-card-view-product-btn {
    opacity: 1;
    visibility: visible;
}

/* Ensure button is visible for reserved gifts in completed section */
.gifted-cards-container .gift-card:hover .gift-card-view-product-btn,
.gifted-cards-container .gift-card-image:hover .gift-card-view-product-btn {
    opacity: 1;
    visibility: visible;
}

.gift-card-view-product-btn i {
    font-size: 16px;
    transition: color 0.2s ease;
}

.gift-card-view-product-btn:hover {
    background: #9b607c;
    color: white;
    transform: scale(1.05);
}

.gift-card-view-product-btn:hover i {
    color: white;
}

/* Login Prompt Modal - Higher z-index to appear above contribution modal */
#loginPromptModal.modal {
    z-index: 1001;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    .gift-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px;
    }

    .gift-card {
        max-width: 100%;
    }

    .card-title-price-container {
        height: 54px; /* Fixed height for exactly 3 lines: 15px × 1.2 × 3 */
        font-size: 15px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .card-user-count {
        font-size: 15px;
    }
    
    .card-progress-container {
        gap: 8px;
    }
    
    .card-progress-bar {
        flex: 0.9;
        min-width: 0;
    }
    
    /* Ribbon positioning for reserved/gifted cards on mobile */
    .gift-card-image .ribbon-wrapper {
        width: 110px;
        height: 110px;
    }
    
    .gift-card-image .ribbon {
        width: 165px;
        font-size: 12px;
    }
    
    /* Always show contribute button on mobile */
    .gift-card-contribute-btn {
        opacity: 1 !important;
        visibility: visible !important;
        width: 36px; /* 30% smaller: 52px × 0.7 */
        height: 36px; /* 30% smaller: 52px × 0.7 */
    }
    
    .gift-card-contribute-btn i {
        font-size: 15px; /* 30% smaller: 21px × 0.7 */
    }
    
    /* Always show view product button on mobile */
    .gift-card-view-product-btn {
        opacity: 1 !important;
        visibility: visible !important;
        width: 32px;
        height: 32px;
    }
    
    .gift-card-view-product-btn i {
        font-size: 13px;
    }
    
    /* Toggle button mobile adjustments */
    .gifted-cards-toggle {
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* Toggle Button for Gifted Cards */
.gifted-cards-toggle {
    grid-column: 1 / -1; /* Span full width of grid */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    margin: 20px 0;
    background: transparent;
    border: 1px solid #e3dcd6;
    border-radius: 8px;
    color: #262e2e;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Work Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.gifted-cards-toggle:hover {
    background: #f5f5f5;
    border-color: #9b607c;
    color: #9b607c;
}

.gifted-cards-toggle .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.gifted-cards-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(90deg);
}

/* Gifted Cards Container */
.gifted-cards-container {
    grid-column: 1 / -1; /* Span full width to start on new row */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    justify-items: center;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 5000px; /* Large enough for content */
    opacity: 1;
}

.gifted-cards-container.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* Mobile adjustments for gifted cards container */
@media screen and (max-width: 768px) {
    .gifted-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 20px;
    }
}

/* View Contribution Modal Styles */
.view-contribution-modal .modal-content {
    max-width: 450px;
    padding: 30px;
    border-radius: 16px;
}

.view-contrib-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.view-contrib-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.view-contrib-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.view-contrib-amount {
    font-weight: 600;
    color: #324848;
    font-size: 18px;
}

.view-contrib-date {
    font-size: 12px;
    color: #888;
}

.view-contrib-note {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    font-style: italic;
}

.view-contrib-footer {
    text-align: center;
    margin-top: 10px;
}

.button-secondary {
    background: #e3dcd6;
    color: #262e2e;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.button-secondary:hover {
    background: #d4c5b8;
}

/* Eye Button for Gift Card */
.gift-card-view-contrib-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E1B672;
    border: none;
    color: #262e2e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 20;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    /* Make visible by default - rendered conditionally by template logic only if contributed */
    opacity: 1;
    visibility: visible;
}

.gift-card:hover .gift-card-view-contrib-btn,
.gift-card-image:hover .gift-card-view-contrib-btn {
    /* No change needed on hover as it's already visible */
    opacity: 1;
    visibility: visible;
}

.gift-card-view-contrib-btn:hover {
    background: #D4A86A; /* Slightly darker shade for hover interaction */
    color: #262e2e;
    transform: scale(1.05);
}

/* Mobile visibility for eye button */
@media (max-width: 768px) {
    .gift-card-view-contrib-btn {
        opacity: 1 !important;
        visibility: visible !important;
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }
}

/* Contribution Preview Overlay */
.gift-card-contrib-preview {
    position: absolute;
    top: 50px; /* Below eye button */
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    color: #262e2e;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 25; /* Above ribbon (z-index: 15) but below button (z-index: 20) */
    max-width: 140px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none; /* Let clicks pass through to card/image */
    text-align: left;
}

.gift-card-view-contrib-btn:hover + .gift-card-contrib-preview {
    opacity: 1;
    visibility: visible;
    transform: translateY(2px);
}

.contrib-preview-amount {
    font-weight: 700;
    color: #324848;
    display: block;
    margin-bottom: 0;
}

/* Hide note in preview overlay as requested */
.contrib-preview-note {
    display: none;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.button {
    min-width: 140px;
    display: inline-block;
    padding: 6px 16px;
    margin: 6px 8px 0 0;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border: 1.5px solid #ddd;
    background-color: white;
    color: black;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-align: center;
}

.button:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}


/* Reserve Button */
.button-reserve {
    min-width: 140px;
    display: inline-block;
    padding: 6px 16px;
    margin: 6px 8px 0 0;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border: 1.5px solid #ddd;
    background-color: white;
    color: black;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-align: center;
}

.button-reserve:hover {
    background: #324848;
    color: white;
}

.button-disabled {
    background-color: #d3d3d3;
    color: #666;
    cursor: not-allowed;
    min-width: 140px;
    display: inline-block;
    padding: 6px 16px;
    margin: 6px 8px 0 0;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border: 1.5px solid #ddd;
    transition: all 0.2s ease-in-out;
    text-align: center;
    width: auto; /* Allow button to size naturally */
  }

/* Modal Content - Desktop */
.modal-content .button-contribute {
    float: none !important;
    margin: 20px 0 8px 0;
    width: auto;
    padding: 8px 16px;
    border: 1.5px solid #324848;
    background-color: white;
    color: #324848;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-align: center;
    display: inline-block;
}

.modal-content .button-contribute:hover {
    background: #324848;
    color: white;
}

/* Disabled button in contribution modal only */
#contributionModal .button-contribute.button-disabled,
#contributionModal .button-contribute:disabled {
    background-color: #d3d3d3 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    border-color: #ccc !important;
    opacity: 0.6;
}

#contributionModal .button-contribute.button-disabled:hover,
#contributionModal .button-contribute:disabled:hover {
    background-color: #d3d3d3 !important;
    color: #666 !important;
}

/* ============================================
   GENERAL MODAL STYLES
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    animation: none !important;
    transition: none !important;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 40%;
    text-align: center;
}

.shagun-modal-content {
    background-color: #8B0D32;  /* deep maroon color */
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 40%;
    text-align: center;
    align-content: center;
    margin-top: 20px;;
    gap: 20px;

}

.shagun-modal-content h2,
.shagun-modal-content h3 {
    color: #ffffff;  /* white text for better contrast */
    margin-top: 20px;
}

.shagun-modal-content input {
    width: 30%;
    padding: 8px;
    margin: 10px 0;
  }

.shagun-explanation-text {
    margin-top: 10px;
    font-size: 14px; /* Makes text smaller than default */
    line-height: 1.4; /* Improves readability of smaller text */
    margin-bottom: 20px; /* Adds space below the text */
    color: #666; /* Optional: lighter color for secondary text */
    display: block; /* Ensures the text takes up its own block */
    color: #ffffff;
    line-height: 1.4;
    text-align: center;
}
.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content input {
    width: 80%;
    padding: 8px;
    margin: 10px 0;
  }

.modal-content .button {
    margin-top: 10px;
    border: 1px solid #cccccc;
  }

.modal-content button:hover {
    background: #324848;
}

/* Shared styles for all modal textareas */
.modal textarea,
textarea.modal-textbox {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* On focus - when you have selected the text box */
.modal textarea:focus,
textarea.modal-textbox:focus {
  outline: none;
  border-color: #324848;
  box-shadow: 0 0 6px rgba(50, 72, 72, 0.4);
}

/* Placeholder styling */
.modal textarea::placeholder,
textarea.modal-textbox::placeholder {
  color: #888;
  font-style: italic;
}

.modal-content .explanation-text {
    margin-top: 10px;
    font-size: 14px; /* Makes text smaller than default */
    line-height: 1.4; /* Improves readability of smaller text */
    margin-bottom: 20px; /* Adds space below the text */
    color: #666; /* Optional: lighter color for secondary text */
    display: block; /* Ensures the text takes up its own block */
    line-height: 1.4;
    text-align: center;
}

/* Updated currency input styling with symbol inside */
.currency-input {
  position: relative;
  display: flex;
  width: 100%;
  margin: 20px 0;
}

.currency-input .currency-symbol {
  position: absolute;
  left: 12px; /* Fixed distance from the left edge of input */
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #555;
  pointer-events: none; /* Allow clicking through the symbol */
  z-index: 2;
  white-space: nowrap; /* Prevents the symbol from wrapping */
}

.currency-input input {
  height: 40px;
  width: 30%;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-sizing: border-box;
  min-width: 100px;
  text-indent: 20px;
}

/* Add mobile-specific adjustments */
@media screen and (max-width: 768px) {
  .currency-input .currency-symbol {
    left: 12px; /* Keep consistent on mobile */
  }

  .currency-input input {
    font-size: 16px; /* Prevent iOS zoom */
    padding-left: 30px; /* Keep consistent padding */
  }
}

/* ============================================
   RIBBON STYLES
   ============================================ */

.ribbon-wrapper {
    position: absolute;
    top: -5px; /* Adjust as needed */
    left: -5px; /* Adjust as needed */
    width: 150px; /* Adjust as needed */
    height: 150px; /* Adjust as needed */
    overflow: hidden;
    z-index: 10; /* Ensure it's above other card content */
}

.ribbon {
    position: absolute;
    display: block;
    width: 220px; /* Adjust as needed */
    padding: 10px 0;
    background: #E1B672; /* Static yellow */
    color: #40220F; /* Dark brown text for better contrast */
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    transform: rotate(-45deg);
    left: -50px; /* Adjust to position the rotated ribbon */
    top: 45px;  /* Adjust to position the rotated ribbon */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    text-shadow: 0 1px 1px rgba(255,255,255,0.4);
    border: 1px solid rgba(218, 165, 32, 0.3); /* Subtle border */
}

@keyframes shine {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Mobile currency selector and user badge styles */
@media screen and (max-width: 768px) {
    .currency-selector {
        margin-right: 10px;
        position: relative;
        display: inline-flex;
        align-items: center;
    }

    /* Hide the select dropdown visually on mobile, but keep it functional */
    .currency-selector select {
        position: absolute;
        opacity: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
        z-index: 2;
        padding: 0;
        margin: 0;
        border: none;
        background: transparent;
    }

    /* Show the currency display on mobile */
    .currency-display {
        display: inline-block;
        background-color: #f9f9f9;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 8px 12px;
        font-size: 18px;
        font-weight: 500;
        color: #324848;
        min-width: 45px;
        text-align: center;
        pointer-events: none;
        z-index: 1;
    }

    /* Add dropdown arrow indicator */
    .currency-selector::after {
        content: '';
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid #324848;
        z-index: 1;
    }

    .user-badge {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* ============================================
   TUTORIAL MODAL STYLES
   ============================================ */

/* Tutorial Modals - Fixed Height Only */
.tutorial-modal .modal-content {
    height: 400px;
    width: 400px;
    position: relative;
    animation: none !important;
    transition: none !important;
}

img.tutorial-illust {
    height: 200px;          /* desktop max width  */
    width: auto;
    display: block;
    margin: 0 auto 22px;   /* center + gap below */
}

/* Tutorial illustration link */
a > img.tutorial-illust-link {
    cursor: pointer;
    transition: opacity 0.2s ease;
    height: 200px;          /* desktop max width  */
    width: auto;
    display: block;
    margin: 0 auto 22px; 
}

a > img.tutorial-illust-link:hover {
    opacity: 0.85;
}

/* Close button positioning for tutorial modals */
.tutorial-modal .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    float: none;
    z-index: 11;
}

.tutorial-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

/* Tutorial indicator dots */
.indicator-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d0ccc6;      /* empty/inactive circle */
    border: 2px solid #d0ccc6;
    margin: 0 6px;
    transition: all 0.2s ease;
}

.indicator-dot.active {
    background-color: #262e2e;      /* filled/active circle */
    border-color: #262e2e;
}

.tutorial-login {
    background: #324848;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.tutorial-login:hover {
    background: #2a3a3a;
    transform: scale(1.05);
}

.tutorial-close {
    min-width: 140px;
    display: inline-block;
    padding: 6px 16px;
    margin: 0;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border: 1.5px solid #ddd;
    background-color: white;
    color: black;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-align: center;
}

.tutorial-close:hover {
    background-color: #c43434 !important;
    color: white;
}

/* Tutorial chevron navigation */
.tutorial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #e3dcd6;
    color: #262e2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 10;
}

.tutorial-prev { left: 16px; }
.tutorial-next { right: 16px; }

.tutorial-nav[disabled],
.tutorial-nav:disabled {
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #d0ccc6 !important;
    color: #999 !important;
    min-width: auto !important;
    border-radius: 50% !important;
    padding: 0 !important;
}

.tutorial-nav[disabled]:hover,
.tutorial-nav:disabled:hover {
    width: 36px !important;
    height: 36px !important;
    opacity: 0.5 !important;
    background: #d0ccc6 !important;
    transform: translateY(-50%) !important;
}

.tutorial-nav:hover {
    background: #324848;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.tutorial-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Final slide CTA container */
.tutorial-final-cta {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

/* WhatsApp Float Button */
.hiw-float i {
    font-size: 40px; /* Adjust size (currently defaults to ~16px) */
    color: white; /* Change color - try #f2efec, #9b607c, or any brand color */
}

.hiw-float:hover i {
    color: #f2efec; /* Slightly different on hover for effect */
}

/* Add this style to ensure the container adapts to the icon size */
.hiw-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #9b607c;
    color: white;
    border-radius: 30px;
    padding: 3px 3px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Work Sans', sans-serif;
    width: fit-content; /* Makes container fit its content */
    box-sizing: border-box; /* Ensures padding doesn't affect overall width */
}

/* For mobile devices */
@media screen and (max-width: 767px) {
    .hiw-float i {
        font-size: 40px; /* Adjust size (currently defaults to ~16px) */
        color: white; /* Change color - try #f2efec, #9b607c, or any brand color */
    }
    
    .hiw-float:hover i {
        color: #f2efec; /* Slightly different on hover for effect */
    }
    
    /* Add this style to ensure the container adapts to the icon size */
    .hiw-float {
        position: fixed;
        bottom: 40px;
        right: 40px;
        background-color: #9b607c;
        color: white;
        border-radius: 30px;
        padding: 3px 3px;
        display: flex;
        align-items: center;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        transition: all 0.3s ease;
        text-decoration: none;
        font-family: 'Work Sans', sans-serif;
        width: fit-content; /* Makes container fit its content */
        box-sizing: border-box; /* Ensures padding doesn't affect overall width */
    }

    /* Tutorial Modal Mobile Styles */
    .tutorial-modal .modal-content {
        height: auto;              /* Let content determine height */
        min-height: 450px;         /* Minimum height */
        max-height: 85vh;          /* Don't exceed viewport */
        width: calc(100% - 40px);  /* Full width minus margins */
        max-width: 380px;          /* Cap maximum width */
        margin-top: 100px;          /* Center with top spacing */
        padding: 30px 20px 20px;   /* More top padding for close button */
        overflow-y: auto;          /* Scroll if content too tall */
        position: relative;
        border-radius: 15px;
    }

    /* Adjust image size for mobile */
    img.tutorial-illust {
        height: 160px;
        max-width: 100%;
        margin: 50px auto 50px;
    }

    a > img.tutorial-illust-link {
        height: 160px;
        max-width: 100%;
        margin: 50px auto 50px;
    }

    /* Close button positioning */
    .tutorial-modal .modal-close {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 28px;
        z-index: 11;
    }

    /* Text spacing */
    .tutorial-modal .modal-content p {
        margin-bottom: 16px;
        font-size: 14px;
        line-height: 1.5;
    }

    /* Indicator dots */
    .tutorial-indicator {
        position: absolute;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    .indicator-dot {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }

    /* Chevron navigation */
    .tutorial-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .tutorial-prev { left: 8px; }
    .tutorial-next { right: 8px; }

    .tutorial-nav[disabled],
    .tutorial-nav:disabled {
        width: 36px !important;
        height: 36px !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 0.5 !important;
        cursor: not-allowed !important;
        background: #d0ccc6 !important;
        color: #999 !important;
        min-width: auto !important;
        border-radius: 50% !important;
        padding: 0 !important;
    }
}

/* ============================================
   CUSTOMIZE URL MODAL (Delete Wishlist Confirmation Modal)
   ============================================ */

/* Delete Wishlist Confirmation Modal */
.delete-wishlist-confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.delete-wishlist-confirmation-modal.show {
    display: flex;
}

.delete-wishlist-confirmation-popup {
    background-color: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-family: 'Work Sans', sans-serif;
}

/* Wider modal for customize URL to fit URL text better */
#customizeUrlModal .delete-wishlist-confirmation-popup {
    max-width: 600px;
}

.delete-wishlist-confirmation-popup h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #262e2e;
    letter-spacing: -0.48px;
}

.delete-wishlist-confirmation-popup p {
    margin: 0 0 24px 0;
    font-size: 16px;
    color: #626262;
    line-height: 1.6;
}

.delete-wishlist-confirmation-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.delete-wishlist-confirmation-button {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Work Sans', sans-serif;
    transition: opacity 0.2s ease;
}

.delete-wishlist-confirmation-button.yes {
    background-color: #324848;
    color: white;
}

.delete-wishlist-confirmation-button.yes:hover {
    opacity: 0.9;
}

.delete-wishlist-confirmation-button.no {
    background-color: #e3dcd6;
    color: #262e2e;
}

.delete-wishlist-confirmation-button.no:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .delete-wishlist-confirmation-popup {
        padding: 24px 20px;
        width: 95%;
        max-width: 95%;
        overflow-x: hidden;
    }
    
    .delete-wishlist-confirmation-popup h3 {
        font-size: 20px;
    }
    
    .delete-wishlist-confirmation-buttons {
        flex-direction: column;
    }
    
    .delete-wishlist-confirmation-button {
        width: 100%;
    }
    
    /* Ensure form fields stay within modal on mobile */
    .delete-wishlist-confirmation-popup form {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .delete-wishlist-confirmation-popup form > div {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix flex container for URL input on mobile */
    .customize-url-input-wrapper {
        flex-wrap: wrap !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .customize-url-prefix {
        font-size: 11px !important;
        padding: 10px 6px !important;
        white-space: normal !important;
        word-break: break-all !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
        max-width: 100% !important;
        text-align: center !important;
    }
    
    .customize-url-input {
        min-width: 0 !important;
        flex: 1 1 auto !important;
        font-size: 14px !important;
        max-width: 100% !important;
        text-align: center !important;
    }
    
    /* Stack prefix and input vertically on very small screens */
    @media (max-width: 400px) {
        .customize-url-input-wrapper {
            flex-direction: column !important;
        }
        
        .customize-url-prefix {
            width: 100% !important;
            border-radius: 8px 8px 0 0 !important;
            border-right: 1px solid #e3dcd6 !important;
            border-bottom: none !important;
            text-align: center;
        }
        
        .customize-url-input {
            width: 100% !important;
            border-radius: 0 0 8px 8px !important;
            border-left: 1px solid #e3dcd6 !important;
        }
    }
}
