/* Global and Base Styles */
* {
    /* margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'RB', Arial, sans-serif;*/

    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-variant-ligatures: common-ligatures;
    font-feature-settings: "salt" 1;
    font-family: 'RB', Arial, sans-serif;
}

body {
    background-color: #FFFFFF;
    color: #003740;
    direction: rtl;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 16px;
    /*background-color: #FFFFFF;
    color: #000000;
    direction: rtl;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 16px;*/
}

.container {
    width: 100%;
    max-width: 600px;
    min-width: auto;
    margin: 0 auto;
    padding: 0 15px;
}

/* Logo and Header */


.divider {
    height: 0.93px;
    background-color: rgba(0, 0, 0, 0.14);
    border: none;
    margin: 0;
}

    .divider.thick {
        height: 1.3px;
        background-color: rgba(0, 0, 0, 0.24);
    }

.section-spacing {
    height: 60px;
}

/* Header Styles */
.header {
    text-align: center;
    padding: 16px;
}

.logo {
    height: 50px;
}

.section-header {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-top: 20px;
}

.section-icon {
    height: 30px;
    margin-left: 5px;
}

.section-title {
    font-size: 22px;
}

/* Gift Card Container Styles */
/*.gift-card-container {
    position: relative;
    width: 300px;
    height: 140px;
    margin: 0 auto;
    margin-bottom: 40px;
}

.background-card {
    position: absolute;
    width: 160px;
    height: 100px;
    border-radius: 12px;
    background: linear-gradient(to bottom right, #336697, #003A70);
    box-shadow: 2px 4px 5px rgba(0, 0, 0, 0.1);
}

.card-left {
    transform: translate(-130px, 10px) rotate(-4deg);
}

.card-right {
    transform: translate(-30px, 10px) rotate(4deg);
}

.main-card {
    position: absolute;
    width: 180px;
    height: 110px;
    top: 0;
    left: 50px;
    border-radius: 12px;
    background: linear-gradient(to bottom right, #336697, #003A70);
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.shadow-box {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 100px;
    background: white;
    border-radius: 20px;
    box-shadow: 0px -6px 2px rgba(0, 0, 0, 0.15);
}

.card-icon {
    height: 30px;
}*/


.gift-card-container {
    position: relative;
    width: 300px;
    height: 140px;
    margin: 0 auto;
    margin-bottom: 40px;
}

.background-card {
    position: absolute;
    width: 160px;
    height: 100px;
    border-radius: 12px;
    background: linear-gradient(to bottom right, #003740, #1e5f69);
    box-shadow: 2px 4px 5px rgba(0, 0, 0, 0.1);
}

.card-left {
    transform: translate(-130px, 10px) rotate(-4deg);
}

.card-right {
    transform: translate(-30px, 10px) rotate(4deg);
}

.main-card {
    position: absolute;
    width: 180px;
    height: 110px;
    top: 0;
    left: 50px;
    border-radius: 12px;
    background: linear-gradient(to bottom left, #003740, #1e5f69);
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.shadow-box {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 100px;
    background: white;
    border-radius: 20px;
    box-shadow: 0px -6px 2px rgba(0, 0, 0, 0.15);
}

.card-icon {
    height: 35px;
}

/* Gift Card Stack Styles */
.gift-card-stack {
    position: relative;
    height: 230px;
    margin-bottom: 16px;
    overflow: hidden;
    padding: 0 16px;
}

.gift-card {
    position: absolute;
    width: 100%;
    height: 180px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

    .gift-card:nth-child(1) {
        transform: translateY(0) scale(1);
        z-index: 3;
    }

    .gift-card:nth-child(2) {
        transform: translateY(25px) scale(0.9);
        z-index: 2;
        opacity: 0.7;
    }

    .gift-card:nth-child(3) {
        transform: translateY(50px) scale(0.8);
        z-index: 1;
        opacity: 0.4;
    }

/* Gift Form Styles */
.gift-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    direction: rtl;
}

.form-header {
    padding: 8px;
}

.header-row {
    display: flex;
    align-items: center;
}

.header-icon {
    height: 30px;
}

.header-text {
    font-size: 22px;
    margin-right: 5px;
}

.form-field {
    padding: 2px 8px;
}

.field-row {
    display: flex;
    align-items: center;
}

.message-row {
    align-items: flex-start;
    padding-top: 6px;
}

.field-label {
    font-size: 16px;
    color: rgba(0, 0, 0, 0.38);
    margin-left: 10px;
}

.field-input {
    flex: 1;
    border: none;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.54);
    padding: 4px;
    background: transparent;
}

    .field-input:focus {
        outline: none;
    }

.message-input {
    resize: none;
    padding: 4px;
    min-height: 80px;
}

/* Toggle Container Styles */
.toggle-container {
    max-width: 300px;
    min-width: 300px;
    height: 45px;
    background-color: #F5F5F5;
    border-radius: 25px;
    margin: 8px auto;
    position: relative;
    overflow: hidden;
    direction: ltr;
}

.toggle-bg {
    position: absolute;
    width: 150px;
    height: 45px;
    border-radius: 25px;
    transition: all 0.3s ease;
}


.toggle-left {
    left: 0;
    background-color: #003740;
}

.toggle-right {
    right: 0;
    background-color: #BAA88E;
}

.toggle-row {
    display: flex;
    position: relative;
    z-index: 1;
    height: 100%;
}

.toggle-option {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

/* Template Carousel Styles */
.template-carousel-container {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: auto;
    margin: 20px 0;
    padding-bottom: 10px; /* Add space for the selection line */
    margin-bottom: 20px; /* Add space for the selection line */
    touch-action: pan-y; /* Enable touch for scrolling vertically only */
}

.template-carousel {
    display: flex;
    position: absolute;
    height: 100%;
    will-change: transform; /* Performance optimization */
    transition: transform 0.3s ease;
    cursor: grab;
}

    .template-carousel:active {
        cursor: grabbing;
    }

#templateCarousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* scrollbar-width: none; Firefox */
    /* -ms-overflow-style: none; IE and Edge */
    padding: 20px 0;
}

    #templateCarousel::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }

#templateCarouselContainer {
    overflow: hidden;
    max-width: 100%;
    position: relative;
}

.template-card {
    position: relative;
    flex: 0 0 auto;
    scroll-snap-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    width: 250px;
    height: 460px;
    margin: 0 10px;
    margin-bottom: 10px;
    padding-bottom: 6px; /* Optional: Add some padding at bottom for the line */
    background-color: rgba(0, 0, 0, 0.071); /* Adjust alpha for transparency */
    border-radius: 16px;
    flex-shrink: 0;
}

    .template-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .template-card.selected {
        transform: scale(1.05);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    }

.template-content {
    position: absolute;
    top: 60px;
    width: 100%;
    height: 90%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    color: white;
    box-sizing: border-box;
    direction: rtl; /* For Arabic text */
    padding: 10% 15%; /* Adjust padding to match the second image layout */
    direction: rtl;
    pointer-events: none; /* Prevents content dragging */
    text-align: center;
}

/* Add this to your CSS */
.card-selection-line {
    position: absolute;
    bottom: 0px; /* Position it below the card */

    left: 10%; /* Start at 10% from the left edge */
    width: 0; /* Zero width by default */
    height: 3px;
    background-color: #003740;
    border-radius: 1.5px;
    transition: width 0.3s ease;
    opacity: 1; /* Always visible */
}

.template-card.selected .card-selection-line {
    width: 80%; /* Expand to 80% of card width when selected */
}

/* Template Content Styles */
.recipient-section {
    margin-top: 25%;
    text-align: center;
}

.recipient-label, .sender-label {
    font-size: 14px; /* Reduce size of "للغالي" and "من" labels */
    margin-bottom: 4px;
}

.recipient-name {
    font-size: 16px; /* Adjust recipient name size */
    margin-bottom: 15px;
}

.message-section {
    text-align: center;
    margin-bottom: auto;
    padding: 0 15px;
    max-height: 70%;
    overflow: hidden;
}

.message-text {
    font-size: 12px; /* Reduce message text size */
    line-height: 1.5;
    margin-top: 10px 0; /* Add space above and below message */
    max-height: 100%; /* Limit message height */
    overflow-y: auto; /* Add scrolling for long messages */
    font-size: 10px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sender-section {
    text-align: center;
    margin-bottom: 15%;
}

.sender-name {
    font-size: 12px; /* Slightly larger sender name */
    margin-top: 5px;
}

/* Carousel Navigation Styles */
#carouselNav {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    display: none; /* Hide navigation buttons for drag-based navigation */
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .nav-dot.active {
        background-color: #336697;
        transform: scale(1.3);
    }

/* Card Carousel Styles */
.card-carousel {
    height: 220px;
    width: 100%;
    position: relative;
    margin: 20px auto;
    overflow: hidden;
    perspective: 1200px;
    cursor: grab;
}

    .card-carousel:active {
        cursor: grabbing;
    }

.carousel-container {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

    .carousel-container:active {
        cursor: grabbing;
    }

.gift-card-item {
    width: 250px;
    height: 150px;
    border-radius: 12px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    will-change: transform, opacity;
}

    .gift-card-item.active-card {
        z-index: 1000 !important; /* Ensure active card is always on top */
        transform: translate(-50%, -50%) scale(1.1) !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

.gift-card-inactive {
    z-index: 50;
}

.gift-card-indicator {
    display: none;
}

.gift-card-inactive .gift-card-indicator {
    width: 20px; /* Keep the indicator smaller for inactive cards */
}

.carousel-indicator {
    width: 50px;
    height: 4px;
    background-color: #003A70;
    border-radius: 2px;
    position: absolute;
    bottom: 10px; /* Change from -10px to a positive value */
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
    z-index: 5;
}

/* Card Content Styles */
.card-content {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.card-value {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    z-index: 5;
}

/* Gradient Background Styles */
/*.gradient-blue {
  background: linear-gradient(135deg, #003A70, #0059A0);
  color: white;
}

.gradient-peach {
  background: linear-gradient(135deg, #DD9880, #BC6C55);
  color: white;
}

.gradient-teal {
  background: linear-gradient(135deg, #008080, #20B2AA);
  color: white;
}

.gradient-purple {
  background: linear-gradient(135deg, #663399, #9370DB);
  color: white;
}

.gradient-amber {
  background: linear-gradient(135deg, #D79000, #FFC107);
  color: white;
}

.gradient-indigo {
  background: linear-gradient(135deg, #3F51B5, #448AFF);
  color: white;
}*/
.gradient-blue {
    background: linear-gradient( 180deg, #0A4A54 0%, #003740 55%, #1F5B63 100% );
    color: #ffffff;
}

.gradient-peach {
    background: linear-gradient( 180deg, #EDE4D7 0%, #D8C8B5 50%, #BAA88E 100% );
    color: #003740;
}

.gradient-teal {
    background: linear-gradient( 135deg, #0F444C 0%, #003740 60%, #C8B79F 120% );
    color: #ffffff;
}

.gradient-purple {
    background: linear-gradient( 180deg, #8B8380 0%, #776F6D 60%, #5C5553 100% );
    color: #ffffff;
}

.gradient-amber {
    background: linear-gradient( 140deg, #0F444C 0%, #003740 60%, #776F6D 120% );
    color: #ffffff;
}

.gradient-indigo {
    background: linear-gradient( 180deg, #BAA88E 0%, #afa08b 60%, rgb(189, 183, 177) 100% );
    color: #003740;
}

.icon-selection-widget {
    height: 80px;
    overflow-x: auto;
    white-space: nowrap;
}

.list-view {
    display: flex;
    padding: 0 20px;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-container {
    width: 60px;
    height: 60px;
    margin: 0 10px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .icon-container img {
        max-width: 100%;
        max-height: 100%;
    }

.indicator-line {
    width: 0;
    height: 3px;
    margin-top: 4px;
    background-color: #336697;
    border-radius: 2px;
    transition: width 300ms ease-out;
}

.finish-button {
    background-color: #003A70;
    color: #DD9880;
    border: none;
    border-radius: 18px;
    padding: 12px 55px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin: 30px auto;
    display: block;
    transition: all 0.3s ease;
}

    .finish-button:hover {
        background-color: #00284F;
    }
