/**
 * Checkout Page Styles
 * Figma Node: 30:2782 — "Gamesub - Purchase"
 *
 * Design tokens:
 *   Background:              #101114
 *   Neutral/09 - Section:    #1C1E22
 *   Neutral/08 - Frame:      #25272D
 *   Neutral/07 - Border:     #30343B
 *   Neutral/06 - Frame 2:    #3C4049
 *   Primary:                 #1081DF
 *   Neutral/01:              #C4C8CF
 *   Neutral/02 - Secondary:  #8F96A3
 *   Other/Green:             #1C7D45
 *   Font:                    IRANSansX / Vazir
 *
 * @package Strategic_Club
 * @since 1.0.0
 */

/* --- Page base --------------------------------------------------------------- */
body.page-template-page-checkout,
body.page-template-page-checkout .site-main {
    background-color: #101114;
}

.sc-checkout-page {
    --sc-bg-page:        #101114;
    --sc-bg-section:     #1c1e22;
    --sc-bg-frame:       #25272d;
    --sc-bg-frame2:      #3c4049;
    --sc-border:         #30343b;
    --sc-text-primary:   #ffffff;
    --sc-text-secondary: #8f96a3;
    --sc-text-muted:     #c4c8cf;
    --sc-primary:        #1081df;
    --sc-green:          #1c7d45;
    --sc-radius-card:    8px;
    --sc-radius-btn:     4px;
    --sc-transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --sc-font:           'Vazir', 'IRANSansX', 'Tahoma', sans-serif;

    background-color: var(--sc-bg-page);
    direction: rtl;
    font-family: var(--sc-font);
    padding: 64px 0 32px;
    margin: 0;
    min-height: auto;
    box-sizing: border-box;
    overflow-x: hidden;
    max-width: 100%;
}

.sc-checkout-page *,
.sc-checkout-page *::before,
.sc-checkout-page *::after {
    box-sizing: border-box;
}

.sc-checkout-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 108px;
}

/* --- Breadcrumb / title ------------------------------------------------------ */
.sc-checkout-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 32px;
    flex-direction: row-reverse;
}

.sc-checkout-breadcrumb__title {
    margin: 0;
    font-family: var(--sc-font);
    font-size: 24px;
    font-weight: 400;
    line-height: 32px;
    color: var(--sc-text-primary);
    text-align: right;
}

.sc-checkout-breadcrumb__icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
}

.sc-checkout-breadcrumb__icon img {
    width: 24px;
    height: 24px;
    display: block;
}

/* --- Notices ----------------------------------------------------------------- */
.sc-checkout-notice {
    margin-bottom: 24px;
    padding: 12px 16px;
    border-radius: var(--sc-radius-btn);
    font-family: var(--sc-font);
    font-size: 14px;
    line-height: 1.5;
    text-align: right;
}

.sc-checkout-notice--error {
    background-color: rgba(179, 45, 46, 0.15);
    border: 1px solid #b32d2e;
    color: #ffb3b3;
}

.sc-checkout-notice--warning {
    background-color: rgba(153, 104, 0, 0.15);
    border: 1px solid #996800;
    color: #ffd27a;
}

/* --- Layout ------------------------------------------------------------------ */
.sc-checkout-form {
    margin: 0;
}

.sc-checkout-layout {
    display: flex;
    align-items: stretch;
    gap: 24px;
    direction: ltr;
}

.sc-checkout-summary {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    background-color: var(--sc-bg-section);
    border-radius: var(--sc-radius-card);
    direction: rtl;
}

.sc-checkout-main {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    direction: rtl;
}

/* --- Order summary ----------------------------------------------------------- */
.sc-checkout-summary__top {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.sc-checkout-summary__title {
    margin: 0;
    font-family: var(--sc-font);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--sc-text-primary);
    text-align: right;
}

.sc-checkout-summary__rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.sc-checkout-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--sc-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
}

.sc-checkout-summary__label {
    color: var(--sc-text-secondary);
}

.sc-checkout-summary__value {
    color: var(--sc-text-primary);
}

.sc-checkout-summary__value--discount {
    color: var(--sc-green);
}

.sc-checkout-summary__divider {
    width: 100%;
    height: 1px;
    background-color: var(--sc-border);
}

.sc-checkout-summary__row--total {
    align-items: center;
}

.sc-checkout-summary__label--total {
    color: var(--sc-text-primary);
    font-size: 16px;
    font-weight: 700;
}

.sc-checkout-summary__value--total {
    font-size: 20px;
    font-weight: 500;
}

/* --- Summary bottom ---------------------------------------------------------- */
.sc-checkout-summary__bottom {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* --- Trust seal (Enamad) ----------------------------------------------------- */
.sc-checkout-summary__trust {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    background-color: var(--sc-bg-frame);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius-card);
    text-align: center;
}

.sc-checkout-summary__trust-title {
    font-family: var(--sc-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--sc-text-secondary);
}

.sc-checkout-summary__enamad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background-color: #ffffff;
    border-radius: var(--sc-radius-btn);
    transition: transform var(--sc-transition), box-shadow var(--sc-transition);
}

.sc-checkout-summary__enamad:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.sc-checkout-summary__enamad img {
    display: block;
    width: 72px;
    height: auto;
}

/* --- Submit button ----------------------------------------------------------- */
.sc-checkout-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--sc-radius-btn);
    background-color: var(--sc-primary);
    color: #ffffff;
    font-family: var(--sc-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color var(--sc-transition), transform var(--sc-transition);
}

.sc-checkout-submit:hover:not(:disabled) {
    background-color: #0d6fbf;
    transform: translateY(-1px);
}

.sc-checkout-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Cards ------------------------------------------------------------------- */
.sc-checkout-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    padding: 24px;
    background-color: var(--sc-bg-section);
    border-radius: var(--sc-radius-card);
}

.sc-checkout-card__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    width: 100%;
}

.sc-checkout-card__title {
    margin: 0;
    font-family: var(--sc-font);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--sc-text-primary);
}

.sc-checkout-card__desc {
    margin: 0;
    font-family: var(--sc-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--sc-text-secondary);
}

/* --- Form fields ------------------------------------------------------------- */
.sc-checkout-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.sc-checkout-field-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.sc-checkout-field-row .sc-checkout-field {
    flex: 1 1 0;
    min-width: 0;
}

.sc-checkout-field {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    padding: 0 16px;
    background-color: var(--sc-bg-frame);
    border: 1.5px solid var(--sc-border);
    border-radius: var(--sc-radius-btn);
    transition: border-color var(--sc-transition);
}

.sc-checkout-field:focus-within {
    border-color: var(--sc-primary);
}

.sc-checkout-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--sc-text-primary);
    font-family: var(--sc-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    text-align: right;
    direction: rtl;
}

.sc-checkout-input::placeholder {
    color: var(--sc-text-muted);
    opacity: 1;
}

/* Stop Chrome/Safari autofill from painting the transparent inputs white. */
.sc-checkout-input:-webkit-autofill,
.sc-checkout-input:-webkit-autofill:hover,
.sc-checkout-input:-webkit-autofill:focus,
.sc-checkout-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--sc-bg-frame) inset !important;
    box-shadow: 0 0 0 1000px var(--sc-bg-frame) inset !important;
    -webkit-text-fill-color: var(--sc-text-primary) !important;
    caret-color: var(--sc-text-primary);
    transition: background-color 5000s ease-in-out 0s;
}

.sc-checkout-field__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.sc-checkout-field__icon img {
    width: 24px;
    height: 24px;
    display: block;
}

/* --- Product card ------------------------------------------------------------ */
.sc-checkout-card--product {
    gap: 24px;
}

.sc-checkout-product__image {
    width: 100%;
    height: 176px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    background-color: var(--sc-bg-frame);
}

.sc-checkout-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sc-checkout-product__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    text-align: right;
    width: 100%;
}

.sc-checkout-product__title {
    margin: 0;
    font-family: var(--sc-font);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--sc-text-primary);
    width: 100%;
}

.sc-checkout-product__subtitle {
    margin: 0;
    font-family: var(--sc-font);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--sc-text-secondary);
    width: 100%;
}

/* --- Responsive -------------------------------------------------------------- */
@media (max-width: 1100px) {
    .sc-checkout-container {
        padding: 0 32px;
    }

    .sc-checkout-layout {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .sc-checkout-page {
        padding: 32px 0;
    }

    .sc-checkout-container {
        padding: 0 16px;
    }

    .sc-checkout-breadcrumb {
        gap: 8px;
        margin-bottom: 24px;
        flex-wrap: wrap;
    }

    .sc-checkout-breadcrumb__title {
        font-size: 20px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .sc-checkout-summary,
    .sc-checkout-card {
        padding: 16px;
    }

    .sc-checkout-field-row {
        flex-direction: column;
    }

    .sc-checkout-product__image {
        height: 140px;
    }
}

/* --- Extra small-screen refinements ----------------------------------------- */
@media (max-width: 480px) {
    .sc-checkout-page {
        padding: 24px 0;
    }

    .sc-checkout-container {
        padding: 0 12px;
    }

    .sc-checkout-breadcrumb__title {
        font-size: 18px;
    }

    .sc-checkout-summary,
    .sc-checkout-card {
        padding: 12px;
    }

    .sc-checkout-summary__title,
    .sc-checkout-card__title,
    .sc-checkout-product__title {
        font-size: 17px;
    }

    .sc-checkout-product__subtitle {
        font-size: 15px;
    }

    .sc-checkout-summary__row {
        font-size: 14px;
        white-space: normal;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sc-checkout-summary__value--total {
        font-size: 17px;
    }

    .sc-checkout-submit {
        height: 44px;
        font-size: 15px;
    }

    .sc-checkout-product__image {
        height: 120px;
    }

    .sc-checkout-input {
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .sc-checkout-container {
        padding: 0 10px;
    }

    .sc-checkout-breadcrumb__title {
        font-size: 16px;
    }

    .sc-checkout-summary,
    .sc-checkout-card {
        padding: 10px;
    }

    .sc-checkout-product__image {
        height: 104px;
    }
}
