/*
 * Aisha Size Guide — trigger link + popup.
 *
 * Palette matches the site's Elementor kit and the printed charts:
 * cream #FDFBF6 / band #F7F0D5 / olive #4A4023 / ink #3A231D / coral #F16463.
 */

/* ---------------------------------------------------------------- trigger */

.aisha-size-guide-link,
.aisha-size-guide-link:visited {
    display: inline-block;
    margin-block-start: 12px;
    padding: 8px 20px;
    border: 1px solid #F16463;
    border-radius: 3px;
    background: transparent;
    font-size: 0.9em;
    line-height: 1.3;
    color: #F16463;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

/* Language-specific typefaces */
.aisha-size-guide-link--ar {
    font-family: 'Cairo', sans-serif;
}

.aisha-size-guide-link--en {
    font-family: 'Avenir', 'Avenir Next', sans-serif;
}

.aisha-size-guide-link:hover,
.aisha-size-guide-link:focus {
    background: #F16463;
    color: #FDFBF6;
    text-decoration: none;
}

.aisha-size-guide-link:focus-visible {
    outline: 2px solid #F16463;
    outline-offset: 2px;
}
/* ------------------------------------------------------------ scroll lock */

body.aisha-sg-scroll-lock {
    position: fixed;
    inset-inline: 0;
    width: 100%;
    overflow: hidden;
}

/* ------------------------------------------------------------------ modal */

.aisha-sg-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Avenir', 'Avenir Next', sans-serif;
}

.aisha-sg-modal--ar {
    font-family: 'Cairo', sans-serif;
}

.aisha-sg-modal[hidden] {
    display: none !important;
}

.aisha-sg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(58, 35, 29, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.aisha-sg-modal.is-open .aisha-sg-modal__backdrop {
    opacity: 1;
}

.aisha-sg-modal__sheet {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(540px, calc(100vw - 40px));
    max-height: min(82vh, 720px);
    background: #FDFBF6;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(58, 35, 29, 0.28);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}

.aisha-sg-modal.is-open .aisha-sg-modal__sheet {
    opacity: 1;
    transform: none;
}

.aisha-sg-modal__grabber {
    display: none;
}

/* Extra specificity: the theme ships opinionated global button styles. */
.aisha-sg-modal button.aisha-sg-modal__close {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: #F7F0D5;
    color: #4A4023;
    box-shadow: none;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.aisha-sg-modal button.aisha-sg-modal__close:hover,
.aisha-sg-modal button.aisha-sg-modal__close:focus-visible {
    background: #F16463;
    color: #FDFBF6;
}

.aisha-sg-modal button.aisha-sg-modal__close:focus-visible {
    outline: 2px solid #F16463;
    outline-offset: 2px;
}

.aisha-sg-modal__header {
    flex: 0 0 auto;
    padding: 30px 56px 18px;
    text-align: center;
}

.aisha-sg-modal__title {
    margin: 0;
    font-family: inherit;
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #4A4023;
}

.aisha-sg-modal--ar .aisha-sg-modal__title {
    letter-spacing: 0;
    font-size: 21px;
}

.aisha-sg-modal__rule {
    display: block;
    width: 44px;
    height: 2px;
    margin: 14px auto 0;
    background: #D9CD9C;
    border-radius: 1px;
}

.aisha-sg-modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 28px 28px;
    overscroll-behavior: contain;
}

/* ---------------------------------------------------- ring / bangle table */

.aisha-sg-table {
    width: 100%;
    margin: 0;
    border: none;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    color: #3A231D;
}

.aisha-sg-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 11px 8px;
    background: #F7F0D5;
    border: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: #4A4023;
    white-space: nowrap;
}

.aisha-sg-modal--ar .aisha-sg-table th {
    letter-spacing: 0;
    font-size: 13px;
}

.aisha-sg-table th:first-child {
    border-start-start-radius: 999px;
    border-end-start-radius: 999px;
}

.aisha-sg-table th:last-child {
    border-start-end-radius: 999px;
    border-end-end-radius: 999px;
}

/* !important guards against the theme's striped-table styles. */
.aisha-sg-modal .aisha-sg-table tbody tr,
.aisha-sg-modal .aisha-sg-table tbody tr:nth-child(odd),
.aisha-sg-modal .aisha-sg-table tbody tr:nth-child(even) {
    background: transparent !important;
}

.aisha-sg-table td {
    padding: 12px 8px;
    border: none;
    border-bottom: 1px solid #EAE2C6;
    background: transparent !important;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.aisha-sg-table tr:last-child td {
    border-bottom: none;
}

/* ------------------------------------------------------------- chain list */

.aisha-sg-chains {
    margin: 0;
    padding: 0;
    list-style: none;
}

.aisha-sg-chains__row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #EAE2C6;
}

.aisha-sg-chains__row:last-child {
    border-bottom: none;
}

.aisha-sg-chains__thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #F7F0D5;
}

.aisha-sg-chains__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.aisha-sg-chains__name {
    font-size: 15px;
    font-weight: 600;
    color: #3A231D;
}

.aisha-sg-chains__meta {
    font-size: 14px;
    color: #3A231D;
}

.aisha-sg-chains__meta strong {
    font-weight: 600;
}

.aisha-sg-chains__note {
    font-size: 13px;
    color: #6B6B6B;
}

/* ----------------------------------------------------------------- mobile */

@media (max-width: 640px) {
    .aisha-sg-modal {
        align-items: flex-end;
    }

    .aisha-sg-modal__sheet {
        width: 100%;
        max-height: 86vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .aisha-sg-modal.is-open .aisha-sg-modal__sheet {
        transform: none;
    }

    .aisha-sg-modal__grabber {
        display: block;
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        border-radius: 2px;
        background: #D9CD9C;
    }

    .aisha-sg-modal__header {
        padding: 34px 52px 16px;
    }

    .aisha-sg-modal__title {
        font-size: 17px;
    }

    .aisha-sg-modal__body {
        padding: 0 20px 24px;
    }

    .aisha-sg-table {
        font-size: 14px;
    }

    .aisha-sg-chains__thumb {
        width: 56px;
        height: 56px;
    }

    .aisha-sg-chains__name {
        font-size: 14px;
    }
}

/* --------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
    .aisha-sg-modal__backdrop,
    .aisha-sg-modal__sheet,
    .aisha-sg-modal__close {
        transition: none;
    }
}
