body.bible-reference-modal-open {
    overflow: hidden;
}

.bible-reference-modal[hidden] {
    display: none !important;
}

.bible-reference-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 10000;
}

.bible-reference-modal__backdrop {
    background: rgba(0, 0, 0, 0.65);
    inset: 0;
    position: absolute;
}

.bible-reference-modal__dialog {
    background: #ffffff;
    border: 1px solid rgba(71, 211, 229, 0.22);
    border-radius: 24px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
    color: #222222;
    max-height: 85vh;
    max-width: 900px;
    overflow-y: auto;
    padding: 34px 38px 34px 38px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.bible-reference-modal__header {
    align-items: center;
    border-bottom: 1px solid rgba(71, 211, 229, 0.18);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 0 70px 20px 0;
}

.bible-reference-modal__header h2 {
    color: #1f2430;
    font-size: clamp(2rem, 2.5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

.bible-reference-modal__translation {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    gap: 12px;
}

.bible-reference-modal__translation span {
    color: #2b2f38;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.bible-reference-modal__translation select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    background-image: linear-gradient(45deg, transparent 50%, #47d3e5 50%),
        linear-gradient(135deg, #47d3e5 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(50% - 3px),
        calc(100% - 13px) calc(50% - 3px);
    background-repeat: no-repeat;
    background-size: 7px 7px, 7px 7px;
    border: 1px solid rgba(71, 211, 229, 0.45);
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    color: #1f2430;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    min-width: 112px;
    padding: 12px 44px 12px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.bible-reference-modal__translation select:hover {
    border-color: #47d3e5;
    box-shadow: 0 0 0 4px rgba(71, 211, 229, 0.08);
}

.bible-reference-modal__translation select:focus {
    border-color: #47d3e5;
    box-shadow: 0 0 0 4px rgba(71, 211, 229, 0.14);
    outline: none;
}

.bible-reference-modal__close {
    align-items: center;
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid rgba(71, 211, 229, 0.24);
    border-radius: 50%;
    color: #2b2f38;
    cursor: pointer;
    display: inline-flex;
    font-size: 2rem;
    height: 52px;
    justify-content: center;
    line-height: 1;
    margin: 0;
    padding: 0;
    position: absolute;
    right: 24px;
    top: 22px;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
    width: 52px;
}

.bible-reference-modal__close:hover {
    background: rgba(71, 211, 229, 0.08);
    border-color: rgba(71, 211, 229, 0.45);
    color: #1f2430;
    transform: scale(1.03);
}

.bible-reference-modal__close:focus {
    border-color: #47d3e5;
    box-shadow: 0 0 0 4px rgba(71, 211, 229, 0.14);
    outline: none;
}

.bible-reference-modal__content {
    color: #263041;
    font-size: 1.2rem;
    line-height: 1.9;
    margin-top: 0;
}

.bible-reference-modal__passage {
    position: relative;
}

.bible-reference-modal__verse {
    display: block;
    margin: 0 0 22px 0;
    padding-left: 0;
}

.bible-reference-modal__verse:last-child {
    margin-bottom: 0;
}

.bible-reference-modal__verse-number {
    color: #47d3e5;
    display: inline-block;
    font-size: 1.1rem;
    font-style: normal;
    font-weight: 700;
    margin-right: 12px;
    min-width: 28px;
    vertical-align: baseline;
}

.bible-reference-modal__loading {
    color: #2b2f38;
    padding: 20px 0;
    text-align: center;
}

.bible-reference-modal__error {
    color: #8a1f1f;
    margin: 0;
    padding: 15px 0;
}

@media (max-width: 700px) {
    .bible-reference-modal {
        padding: 12px;
    }

    .bible-reference-modal__dialog {
        border-radius: 18px;
        max-height: 90vh;
        padding: 24px 18px 22px 18px;
    }

    .bible-reference-modal__header {
        align-items: flex-start;
        display: block;
        margin-bottom: 22px;
        padding: 0 58px 18px 0;
    }

    .bible-reference-modal__header h2 {
        font-size: 1.9rem;
        margin-bottom: 14px;
    }

    .bible-reference-modal__translation {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .bible-reference-modal__translation select {
        min-width: 100px;
        width: auto;
    }

    .bible-reference-modal__close {
        font-size: 1.7rem;
        height: 44px;
        right: 16px;
        top: 14px;
        width: 44px;
    }

    .bible-reference-modal__content {
        font-size: 1.08rem;
        line-height: 1.8;
    }

    .bible-reference-modal__verse-number {
        font-size: 1rem;
        margin-right: 10px;
        min-width: 24px;
    }
}