/* Button & Counter */
.fcc-wrapper { 
    font-family: "iransans-x", Sans-serif; 
    display: flex;
    flex-direction: column;
    align-items: end;
}
.fcc-modal{font-family: "iransans-x", Sans-serif !important; }
.fcc-add-btn {
    background: #ffe6f0; color: #c0005a; border: none;font-size: 14px;
    border-radius: 6px; cursor: pointer; font-weight: bold; width: 104px; height: 32px;text-align-last: center !important; font-family: "iransans-x", Sans-serif;
    /* This makes the button a flex container for its content */
    display: inline-flex;
    justify-content: center;
    align-items: center;
	gap: 5px;
}
.fcc-variations-list{
	width: 100%;
}
.fcc-counter {
    display: flex; align-items: center;
	width: 104px;height: 32px;
	justify-content: space-between;
}
.fcc-var-title{
	text-align: right;
	    direction: ltr;
}
.fcc-var-info{
	padding-left: 10px;
}
.fcc-counter button {
    background: #F0F0F0; border: none; border-radius: 6px;
    width: 32px; height: 32px; cursor: pointer; font-size: 16px;color: #13141fe6;
    padding: 0.5rem;
}
.fcc-counter span { padding: 0 0; font-weight: bold; }

/* START: New Styles for Unavailable State */
.fcc-action-area {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between button and "ناموجود" text */
    min-height: 32px; /* Prevent layout shift */
}

.fcc-action-area.is-unavailable .fcc-add-btn {
    filter: grayscale(1);
    cursor: not-allowed;
    /* justify-content and align-items are already on the base button style */
}

.fcc-action-area.is-unavailable .fcc-counter {
    display: none !important;
}

.fcc-action-area.is-unavailable .fcc-outofstock-text {
    display: inline-block !important;
}

.fcc-outofstock-text {
    color: red;
    font-weight: bold;
    font-size: 14px;
}
/* END: New Styles for Unavailable State */


/* Modal Bottom Sheet */
.fcc-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 9998;
}
.fcc-modal {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; z-index: 999999; border-radius: 16px 16px 0 0;
    padding: 20px; box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease-out; direction: rtl; font-family: Tahoma, sans-serif;
}
.fcc-var-plus , .fcc-var-minus{
	    display: flex;
    justify-content: center;
    align-items: center;
	width: 32px;
	height: 32px;
}
.fcc-var-plus svg , .fcc-var-minus svg{
	width: 16px;
	height: 16px;
	fill: #13141fe6;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.fcc-modal-header { text-align: right; margin-bottom: 20px;    padding-bottom: 5px; }
.fcc-var-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid #eee; cursor: pointer;
}
#fcc-confirm-var {
    width: 100%; background: #5a55ff; color: #fff; border: none;
    padding: 12px; border-radius: 8px; font-size: 16px; margin-top: 15px; cursor: pointer;
}
.fcc-action-area.is-unavailable {
    flex-direction: row-reverse;
}
/* --- Desktop Centering ONLY --- */
@media (min-width: 768px) {
    .fcc-modal {
        margin: 0 35%;
    }
}


/* Verification modal */
body.fcc-auth-open {
    overflow: hidden !important;
}

.fcc-requires-verification .fcc-add-btn {
    position: relative;
}

.fcc-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(24, 20, 18, .52);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .2s ease;
    direction: rtl;
    font-family: "iransans-x", Sans-serif !important;
}

.fcc-auth-overlay.is-visible {
    opacity: 1;
}

.fcc-auth-modal {
    position: relative;
    width: min(100%, 390px);
    padding: 26px 22px 18px;
    overflow: hidden;
    border: 1px solid rgba(35, 28, 25, .08);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(24, 16, 12, .26);
    text-align: right;
    transform: translateY(10px) scale(.975);
    transition: transform .24s cubic-bezier(.2, .75, .25, 1);
}

.fcc-auth-modal::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff4f91, #c0005a);
}

.fcc-auth-overlay.is-visible .fcc-auth-modal {
    transform: translateY(0) scale(1);
}

.fcc-auth-close {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important;
    z-index: 2;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 1px solid #eee8e5 !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #756862 !important;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.fcc-auth-close:hover {
    background: #fff2f7 !important;
    color: #c0005a !important;
    transform: rotate(5deg);
}

.fcc-auth-close svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.fcc-auth-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-left: 34px;
}

.fcc-auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border: 1px solid #ffd7e7;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff4f8, #ffe3ee);
    color: #c0005a;
}

.fcc-auth-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.fcc-auth-content {
    min-width: 0;
    padding-top: 1px;
}

.fcc-auth-content h3 {
    margin: 0 0 7px !important;
    color: #251d1a !important;
    font-family: inherit !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    line-height: 1.65 !important;
}

.fcc-auth-content p {
    margin: 0 !important;
    color: #766963 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.95 !important;
}

.fcc-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 22px;
}

.fcc-auth-primary,
.fcc-auth-secondary {
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    cursor: pointer;
}

.fcc-auth-primary {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    min-height: 50px;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #d6096c, #b90056) !important;
    box-shadow: 0 10px 24px rgba(192, 0, 90, .22) !important;
    color: #fff !important;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.fcc-auth-primary svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.fcc-auth-primary:hover {
    filter: brightness(.96);
    box-shadow: 0 13px 28px rgba(192, 0, 90, .28) !important;
    transform: translateY(-1px);
    color: #fff !important;
}

.fcc-auth-secondary {
    width: 100% !important;
    min-height: 38px;
    padding: 4px 12px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #7a6d67 !important;
    text-decoration: none !important;
    transition: background .18s ease, color .18s ease;
}

.fcc-auth-secondary:hover {
    background: #faf6f7 !important;
    color: #3f3430 !important;
}

.fcc-auth-primary:focus-visible,
.fcc-auth-secondary:focus-visible,
.fcc-auth-close:focus-visible {
    outline: 3px solid rgba(214, 9, 108, .2) !important;
    outline-offset: 2px;
}

@media (max-width: 520px) {
    .fcc-auth-overlay {
        padding: 16px;
    }

    .fcc-auth-modal {
        width: 100%;
        padding: 25px 20px 16px;
        border-radius: 20px;
    }

    .fcc-auth-header {
        gap: 12px;
        padding-left: 28px;
    }

    .fcc-auth-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 15px;
    }

    .fcc-auth-content h3 {
        font-size: 18px !important;
    }

    .fcc-auth-content p {
        font-size: 12.5px !important;
        line-height: 1.9 !important;
    }

    .fcc-auth-actions {
        margin-top: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fcc-auth-overlay,
    .fcc-auth-modal,
    .fcc-auth-close,
    .fcc-auth-primary,
    .fcc-auth-secondary {
        transition: none !important;
    }
}
