

:root {
    --idhy-bg: #ffffff;
    --idhy-text: #111827;
    --idhy-muted: #9ca3af;
    --idhy-line: #e5e7eb;
    --idhy-item-h: 38px;
    --idhy-wheel-h: 190px;
}



.idhy-wrap {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 16px
}

.idhy-h2 {
    margin: 0 0 16px;
    font-weight: 800
}

.idhy-grid {
    display: grid;
    grid-template-columns:1fr;
    gap: 14px
}

@media (min-width: 640px) {
    .idhy-grid {
        grid-template-columns:1fr 1fr
    }
}

.idhy-field {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.idhy-label {
    font-size: 13px;
    color: #6b7280
}


.idhy-hint {
    font-size: 12px;
    color: #6b7280
}

.idhy-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: .25s
}

.idhy-backdrop.idhy-show {
    opacity: 1;
    pointer-events: auto
}

.idhy-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    width: 100vw;
    transform: translateY(100%);
    transition: .32s cubic-bezier(.2, .6, .2, 1);
    display: flex;
    justify-content: center
}

.idhy-sheet.idhy-open {
    transform: translateY(-50%); /* همیشه مرکز عمودی */
}


.idhy-sheet-card {
    width: clamp(320px, 92vw, 560px);  /* روی موبایل کمتر از 100% */
    max-height: 50vh;
    background: var(--idhy-bg);
    border-radius: 18px;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, .18);
    border: 1px solid var(--idhy-line);
    border-bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    box-sizing: border-box
}

.idhy-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px 10px
}

.idhy-sheet-title {
    font-weight: 800;
    visibility: hidden;
    height: 0;
    padding: 0;
    margin: 0
}

.idhy-btn-icon {
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: #6b7280;
    padding: 6px 8px
}

.idhy-labels {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin: 0 6px 6px
}

.idhy-wheels-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: clip
}

.idhy-wheels {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 0;
    background: #fff;
    border: 1px solid var(--idhy-line);
    border-radius: 16px;
    padding: 8px;
    box-sizing: border-box
}

.idhy-wheel {
    height: var(--idhy-wheel-h);
    margin: auto 0;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    overscroll-behavior: contain;
    padding-block: calc((var(--idhy-wheel-h) - var(--idhy-item-h)) / 2);
    -ms-overflow-style: none;
    scrollbar-width: none
}

.idhy-wheel::-webkit-scrollbar {
    display: none
}

.idhy-item {
    height: var(--idhy-item-h);
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--idhy-muted);
    font-size: 16px;
    filter: blur(1px);
    white-space: nowrap;
    padding: 0 6px;
    box-sizing: border-box
}

.idhy-item.idhy-selected {
    color: var(--idhy-brand, #E13833);
    font-weight: 600;
    filter: none
}

.idhy-sheet-foot {
    display: flex;
    gap: 10px;
    margin-top: 12px
}

.idhy-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer
}

.idhy-btn-primary {
    background: var(--idhy-brand, #E13833);
    color: #fff;
    flex: 1
}

.idhy-btn-soft {
    background: #f3f4f6;
    color: #111
}

body.idhy-modal-open {
    overflow: hidden
}

@media (max-width: 420px) {
    .idhy-sheet-card {
        padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
        border-radius: 14px;
    }

    .idhy-item {
        font-size: 15px
    }
}
