/* Selector Dialog */
.verse-selector-dialog {
    width: min(1100px, 95vw);
    border: 1px solid #cecece;
    border-radius: 12px;
    padding: 0;
}

.verse-selector-dialog::backdrop {
    background: rgba(0, 0, 0, .35);
}

.dialog-shell {
    padding: 1rem;
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.dialog-header h2 {
    margin: 0;
}

.icon-btn {
    border: 1px solid #c8c8c8;
    background: #fff;
    border-radius: 8px;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
}

.step-indicator {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .4rem 0 1rem;
}

.step-chip {
    border: 1px solid #c8c8c8;
    border-radius: 999px;
    padding: .2rem .65rem;
    font-size: .85rem;
    color: #5b5b5b;
    cursor: pointer;
    user-select: none;
}

.step-chip.active {
    border-color: #2f6feb;
    color: #2f6feb;
    font-weight: 600;
}

/* Reusable button grid wrappers for versions/books/chapters. */
.button-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    max-height: 56vh;
    overflow: auto;
    padding-right: .25rem;
}

.book-wrap {
    max-height: 50vh;
}

.chapter-wrap {
    max-height: 52vh;
}

.pick-btn {
    border: 1px solid #c8c8c8;
    background: #fff;
    border-radius: 8px;
    padding: .4rem .65rem;
    cursor: pointer;
}

.pick-btn.selected {
    border-color: #2f6feb;
    background: #eaf1ff;
    font-weight: 600;
}

.testament-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.verse-rows {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: 52vh;
    overflow: auto;
    padding-right: .25rem;
}

.verse-row {
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    padding: .55rem .65rem;
    background: #fff;
    cursor: pointer;
}

.verse-row .verse-num {
    font-weight: 700;
    margin-right: .3rem;
}

.verse-row.selected {
    border-color: #2f6feb;
    background: #eaf1ff;
}

.verse-search-wrapper {
    width: 100%;
    max-width: 400px;
    min-width: 0;
    margin-bottom: 0.5rem;
}

.verse-search-wrapper input {
    font-weight: 400;
}

@media (max-width: 960px) {
    /* Tablet width: stack OT/NT columns into one list. */
    .testament-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    /* Mobile spacing and tap targets for dialog interaction. */
    .dialog-shell {
        padding: 0.5rem;
    }

    .dialog-header {
        padding: 0.2rem 0;
    }

    .dialog-header h2 {
        font-size: 1.1rem;
    }

    .verse-row {
        padding: 0.4rem 0.4rem;
        font-size: 1rem;
    }

    .verse-selector-dialog,
    .activity-dialog {
        width: 98vw;
        min-width: 0;
        max-width: 100vw;
        border-radius: 0.7rem;
    }

    .step-indicator {
        gap: 0.2rem;
        font-size: 0.95rem;
    }

    .button-wrap {
        gap: 0.2rem;
        max-height: 60vw;
    }
}
