/* Story Frontend Styles */

/* ==========================================================================
   Submit Form Widget (Latest Layout)
   ========================================================================== */
.story-submit-wrapper-main {
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2D3748;
    box-sizing: border-box;
}

/* Header */
.story-submit-header {
    margin-bottom: 32px;
}

body .story-submit-wrapper-main * {
    font-family: "Jost", Sans-serif;
}

.story-submit-header-title {
    color: #145A32;
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.story-title-green-highlight {
    color: #74B72E;
}

.story-submit-header-subtitle {
    color: #5A6A5E;
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
}

/* Content Grid */
.story-submit-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.story-submit-content-grid>* {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.story-submit-content-grid.has-promo {
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    align-items: stretch;
}

/* Promo Cards Stack */
.story-promo-cards-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    gap: 20px;
    padding: 20px;
}

.story-left-promo-item {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.story-left-promo-item:hover {
    transform: translateY(-3px);
}

.story-promo-card-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

.story-left-promo-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

/* Ticket Card Shared Base */
.story-promo-ticket-card {
    position: relative;
    border-radius: 20px;
    padding: 24px 20px 20px 20px;
    overflow: hidden;
    box-sizing: border-box;
}

.story-promo-ticket-card.card-yellow {
    background: #F6EDD9;
    color: #2D3748;
}

.story-promo-ticket-card.card-blue {
    background: #D5F1FA;
    color: #2D3748;
}

/* Ribbon Tag on Top Left Corner */
.story-ribbon-tag {
    position: absolute;
    top: 18px;
    left: -32px;
    transform: rotate(-45deg);
    width: 130px;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 0;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
    line-height: 1.2;
}

.story-ribbon-tag.tag-green {
    background: #74B72E;
    color: #FFFFFF;
}

.story-ribbon-tag.tag-darkgreen {
    background: #145A32;
    color: #FFFFFF;
}

.story-ticket-content {
    display: flex;
    gap: 16px;
    align-items: center;
}

.story-ticket-media {
    flex: 0 0 130px;
    max-width: 130px;
}

.story-ticket-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.story-ticket-placeholder-img {
    width: 100%;
    height: 100px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
}

.story-ticket-placeholder-img.yellow-img {
    background-color: #EADCB8;
}

.story-ticket-placeholder-img.blue-img {
    background-color: #BBE2EE;
}

.story-ticket-details {
    flex: 1;
}

.story-ticket-headline {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    color: #145A32;
    margin-bottom: 8px;
}

.story-ticket-headline .brand-text {
    font-weight: 800;
    color: #145A32;
}

.story-ticket-headline .kit-title {
    font-weight: 700;
    color: #145A32;
}

.story-ticket-headline .discount-num {
    font-size: 26px;
    font-weight: 900;
    color: #145A32;
}

.story-ticket-headline .pct-sign {
    font-size: 14px;
    vertical-align: super;
}

.story-ticket-headline .evoucher-sub {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: #4A5568;
    margin-top: 2px;
}

.story-ticket-desc {
    font-size: 12px;
    line-height: 1.4;
    color: #2D3748;
    margin: 0 0 6px 0;
}

.story-ticket-disclaimer {
    display: block;
    font-size: 9px;
    color: #718096;
    line-height: 1.3;
}

.story-ticket-headline.blue-headline .free-badge {
    font-size: 26px;
    font-weight: 900;
    color: #145A32;
    display: inline-block;
    margin-right: 6px;
}

.story-ticket-headline.blue-headline .product-sub {
    font-size: 13px;
    font-weight: 700;
    color: #145A32;
    display: block;
}

.story-tc-link-row {
    font-size: 10px;
    color: #718096;
    margin: 8px 0 0 0;
    font-style: italic;
}

.story-tc-highlight-link {
    color: #E53E3E !important;
    text-decoration: underline !important;
}

/* Preview */
.story-preview-container {
    position: relative;
    max-height: 200px;
    overflow: hidden;
    border-radius: 12px;
}

.story-preview-media img,
.story-preview-media video {
    max-width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.story-remove-preview {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 16px;
    line-height: 1;
}

/* Form Card Container */
.story-form-card {
    background: #FFFFFF !important;
    border-radius: 28px !important;
    padding: 40px 36px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03) !important;
    width: 100%;
    box-sizing: border-box;
}

/* Dropzone Box */
.story-dropzone {
    position: relative;
    border: 1.5px dashed #ECEAE4;
    border-radius: 20px;
    padding: 34px 20px;
    text-align: center;
    background: #F7F5F0;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    margin-bottom: 20px;
}

.story-dropzone:hover,
.story-dropzone.dragover {
    border-color: #145A32;
    background: #F2EFE8;
}

.story-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.story-dropzone-icon {
    color: #C5C0B6;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.story-dropzone-text {
    font-size: 13.5px;
    font-weight: 400;
    color: #B5B0A6;
    margin: 0 0 3px 0;
    letter-spacing: -0.01em;
}

.story-dropzone-subtext {
    font-size: 11px;
    color: #C8C4BC;
    display: block;
}

/* Form Controls */
.story-form-row {
    margin-bottom: 14px;
    position: relative;
}

.story-form-grid {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.story-form-col {
    flex: 1;
}

.story-input-badge-wrapper {
    position: relative;
    width: 100%;
}

.story-input-email-badge {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.story-input,
.story-textarea {
    width: 100%;
    background: #F7F5F0;
    border: 1px solid #ECEAE4;
    border-radius: 14px;
    padding: 13px 20px;
    font-size: 14px;
    color: #2D3748;
    outline: none;
    transition: background 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.story-input::placeholder,
.story-textarea::placeholder {
    color: #C0C8C0;
    opacity: 1;
}

.story-textarea {
    border-radius: 14px;
    resize: vertical;
    min-height: 85px;
}

.story-input:focus,
.story-textarea:focus {
    background: #FFFFFF;
    border-color: #145A32;
    box-shadow: 0 0 0 3px rgba(20, 90, 50, 0.08);
}

.story-word-counter {
    position: absolute;
    bottom: -18px;
    right: 12px;
    font-size: 11px;
    color: #A0AEC0;
}

/* Checkboxes */
.story-checkbox-group {
    margin: 20px 0;
}

.story-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
    line-height: 1.5;
    color: #718096;
    font-style: italic;
    cursor: pointer;
}

.story-checkbox-label span {
    font-style: italic;
    font-weight: 400;
    font-size: 11px;
    line-height: 120%;
}

.story-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #145A32;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
}

/* Alert */
.story-form-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.story-form-alert.success {
    background: #E6FFFA;
    color: #234E52;
    border: 1px solid #B2F5EA;
}

.story-form-alert.error {
    background: #FFF5F5;
    color: #9B2C2C;
    border: 1px solid #FEB2B2;
}

/* Submit Button */
.story-submit-wrapper {
    margin-top: 18px;
}

.story-submit-btn {
    background-color: #0F5B24;
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    padding: 14px 38px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.story-submit-btn:hover {
    background-color: #0B481C;
}

.story-submit-btn:active {
    transform: scale(0.98);
}

.story-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: story-spin 0.8s linear infinite;
}

body .story-submit-form input[type=date],
body .story-submit-form input[type=email],
body .story-submit-form input[type=number],
body .story-submit-form input[type=password],
body .story-submit-form input[type=search],
body .story-submit-form input[type=tel],
body .story-submit-form input[type=text],
body .story-submit-form input[type=url],
body .story-submit-form select,
body .story-submit-form textarea {
    border-radius: 12px;
    border-color: #ECEAE2;
    background: #F7F5F0;
}

.story-input:focus,
.story-textarea:focus {
    background: #FFFFFF !important;
    border-color: #145A32 !important;
    box-shadow: 0 0 0 2px rgba(20, 90, 50, 0.1) !important;
}

.story-submit-wrapper .story-submit-btn {
    border-radius: 100px;
    color: #fff;
    font-weight: bold;
    background: #0F5B24;
    border: 0px;
}

.story-submit-wrapper .story-submit-btn:hover {
    background: #116c29 !important;
}

@keyframes story-spin {
    to {
        transform: rotate(360deg);
    }
}

.story-footer-disclaimer {
    font-size: 11px;
    color: #A0AEC0;
    margin-top: 10px;
}

@media (max-width: 991px) {
    .story-submit-wrapper-main {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden;
    }

    .story-promo-cards-stack {
        padding: 0px;
    }

    .story-submit-header-title {
        font-size: 32px !important;
    }

    .story-submit-content-grid,
    .story-submit-content-grid.has-promo,
    .story-submit-content-grid.no-promo {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .story-promo-cards-stack {
        width: 100% !important;
        height: auto !important;
        justify-content: flex-start !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        gap: 16px;
        order: 1 !important;
        overflow: hidden;
    }

    .story-form-card {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 24px 20px !important;
    }

    .story-left-promo-item {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding-left: 0;
        margin-bottom: 0;
        border-radius: 16px;
        overflow: hidden;
    }

    .story-left-promo-item img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        border-radius: 16px;
        display: block !important;
        box-sizing: border-box !important;
    }

    .story-submit-wrapper .story-submit-btn {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .story-form-grid {
        flex-direction: column !important;
        gap: 14px !important;
    }

    .story-submit-section-wrapper.has-left-banner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .story-promo-left {
        padding-right: 0;
        text-align: center;
    }
}


/* ==========================================================================
   Your Stories Widget
   ========================================================================== */
.your-stories-wrapper {
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: visible;
}

.your-stories-header {
    margin-bottom: 24px;
}

.your-stories-title {
    color: #145A32;
    font-size: 64px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.your-stories-wrapper * {
    font-family: "Jost", Sans-serif;
}

.your-stories-subtitle {
    color: #4A5568;
    font-size: 18px;
    margin: 0;
}

.your-stories-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-top: 16px;
    padding-bottom: 24px;
    padding-left: 20px;
    padding-right: max(40px, calc(50vw - 50%));
    margin-top: -16px;
    margin-bottom: -24px;
    margin-left: 0;
    margin-right: calc(50% - 50vw);
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #145A32 #F0F4F1;
}

/* Custom Scrollbar for your-stories-grid */
.your-stories-grid::-webkit-scrollbar {
    height: 6px;
}

.your-stories-grid::-webkit-scrollbar-track {
    background: #F0F4F1;
    border-radius: 10px;
}

.your-stories-grid::-webkit-scrollbar-thumb {
    background: #145A32;
    border-radius: 10px;
}

.your-stories-grid::-webkit-scrollbar-thumb:hover {
    background: #0E3D22;
}

.your-stories-col-1 .your-story-card {
    flex: 0 0 100%;
}

.your-stories-col-2 .your-story-card {
    flex: 0 0 calc(50% - 12px);
    min-width: 280px;
}

.your-stories-col-3 .your-story-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 260px;
}

.your-stories-col-4 .your-story-card {
    flex: 0 0 calc(25% - 18px);
    min-width: 280px;
}

@media (max-width: 1024px) {

    .your-stories-col-4 .your-story-card,
    .your-stories-col-3 .your-story-card {
        flex: 0 0 calc(50% - 12px);
        min-width: 260px;
    }
}

@media (max-width: 640px) {
    .your-stories-grid {
        gap: 16px;
        padding-left: 16px;
        scroll-padding-left: 16px;
        margin-left: 0;
    }

    .your-stories-col-1 .your-story-card,
    .your-stories-col-2 .your-story-card,
    .your-stories-col-3 .your-story-card,
    .your-stories-col-4 .your-story-card,
    .your-story-card {
        flex: 0 0 82% !important;
        min-width: 0 !important;
    }

    .your-story-media-box {
        height: auto !important;
        aspect-ratio: 1.18 / 1 !important;
        padding-top: 0 !important;
    }

    .story-form-grid {
        flex-direction: column;
        gap: 16px;
    }
}

.your-story-card {
    background: #FFFFFF;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    flex: 0 0 280px;
    scroll-snap-align: start;
}

.your-story-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(20, 90, 50, 0.06)
}

.your-story-media-box {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1.18 / 1;
    padding-top: 0;
    background: #fff;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.your-story-media-box img,
.your-story-media-box video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

.your-story-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.your-story-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 2;
}

.your-story-play-btn:hover {
    background: rgba(20, 90, 50, 0.85);
}

.your-story-content-box {
    padding: 14px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-start;
}

.your-story-caption {
    font-size: 13px;
    line-height: 1.45;
    color: #2D3748;
    margin: 0 0 12px 0;
}

.your-story-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #718096;
    margin-top: auto;
}

.your-story-author {
    font-weight: 500;
}

.your-story-date {
    color: #A0AEC0;
}

.story-submit-wrapper .story-submit-btn {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: auto;
    min-width: 291px;
    height: 44px;
    padding: 10px 20px;
    margin: 0;
    background-image: none;
    border: 0;
    border-radius: 100px;
    box-shadow: none;
    outline: none;
    font-weight: 600;
    font-size: 18px;
    line-height: 23px;
    letter-spacing: normal;
    text-align: center;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* ==========================================================================
   Success Popup Modal Styles
   ========================================================================== */
.story-success-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 20px;
    overflow-y: auto;
}

.story-success-modal-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #FAF8F3;
    border-radius: 28px;
    padding: 44px 36px 36px 36px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: storyModalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes storyModalPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.story-modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px !important;
    height: 36px !important;
    border: none !important;
    background: rgba(28, 28, 26, 0.06) !important;
    border-radius: 50% !important;
    color: #555 !important;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease !important;
    padding: 0;
    padding: 10px !important;
}

.story-modal-close-btn:hover {
    background: #E2E2E2;
}

.story-modal-icon {
    width: 56px;
    height: 56px;
    background-color: #D6F0D6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.story-modal-tag {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #145A32;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.story-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    line-height: 1.25;
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
}

.story-modal-desc {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.55;
    margin: 0 0 28px 0;
}

.story-modal-done-btn {
    display: block !important;
    width: 100% !important;
    border: 1px solid #D1D5DB !important;
    background-color: #FAFBF9 !important;
    color: #111827 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    padding: 13px 0 !important;
    border-radius: 100px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
    box-sizing: border-box !important;
}

.story-modal-done-btn:hover {
    background-color: #F3F4F6;
    border-color: #9CA3AF;
}


@media (max-width: 640px) {
    .your-stories-title {
        font-size: 36px;
    }

    .your-stories-title span {
        display: block;
    }
}