/* Popup cầu nguyện — giao diện tối theo mẫu */

.modal-pray .modal-dialog.pray-modal__dialog {
    max-width: 1100px;
    width: calc(100% - 32px);
    margin: 1rem auto;
}

.modal-pray .modal-content.pray-modal__content {
    background: #0d0d0d;
    border: none;
    border-radius: 4px;
    color: #fff;
    padding: 28px 24px 32px;
    position: relative;
}

.modal-pray.show .modal-backdrop,
.modal-pray + .modal-backdrop.show {
    opacity: 0.88;
}

.pray-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 5;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    padding: 0 6px;
}

.pray-modal__close:hover {
    opacity: 1;
}

.pray-modal__grid {
    display: grid;
    grid-template-columns: minmax(280px, 42%) 1fr;
    gap: 28px;
    align-items: start;
}

/* --- Cột trái: nến + thẻ + hoa --- */
.pray-modal__left {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    min-height: 420px;
    padding: 8px 0 40px;
}

.pray-modal__card-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    max-width: 260px;
}

.pray-modal__card {
    width: 100%;
}

.pray-modal__card-frame {
    background: #000;
    border: 2px solid rgba(255, 255, 255, 0.75);
    padding: 18px 14px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.pray-modal__card-frame::before,
.pray-modal__card-frame::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.pray-modal__card-frame::before {
    top: 6px;
    left: 6px;
    border-right: none;
    border-bottom: none;
}

.pray-modal__card-frame::after {
    bottom: 6px;
    right: 6px;
    border-left: none;
    border-top: none;
}

.pray-modal__card-cross {
    margin-bottom: 6px;
    color: #fff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.pray-modal__card-doves {
    height: 20px;
    margin-bottom: 8px;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.25) 0 8%, transparent 9%),
        radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.25) 0 8%, transparent 9%);
    opacity: 0.6;
}

.pray-modal__card-portrait {
    width: 140px;
    height: 140px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
    background: #222;
}

.pray-modal__card-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pray-modal__card-portrait img.is-empty {
    object-fit: contain;
    padding: 24px;
    opacity: 0.35;
    background: #111;
}

.pray-modal__dharma {
    font-size: 14px;
    letter-spacing: 0.08em;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.pray-modal__name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.25;
    text-transform: uppercase;
}

.pray-modal__line {
    font-size: 12px;
    line-height: 1.55;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.pray-modal__complete {
    margin-top: 18px;
    min-width: 200px;
    height: 44px;
    border: none;
    border-radius: 6px;
    background: #477827;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.pray-modal__complete:hover {
    background: #5a9432;
}

/* Nến */
.pray-modal__candle {
    width: 36px;
    height: 160px;
    margin-top: 60px;
    flex-shrink: 0;
    position: relative;
    background: linear-gradient(90deg, #f5e6c8 0%, #e8d4a8 40%, #d4bc88 100%);
    border-radius: 4px 4px 2px 2px;
    box-shadow: inset -4px 0 8px rgba(0, 0, 0, 0.15);
}

.pray-modal__candle::before {
    content: "";
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 28px;
    background: radial-gradient(ellipse at center bottom, #fff8e0 0%, #ffb347 35%, #ff6b00 70%, transparent 72%);
    border-radius: 50% 50% 20% 20%;
    animation: pray-candle-flicker 2.5s ease-in-out infinite;
}

.pray-modal__candle::after {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: #1a1a1a;
    border-radius: 2px;
}

@keyframes pray-candle-flicker {
    0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.85; transform: translateX(-50%) scale(1.05); }
}

/* Hoa lily */
.pray-modal__flower {
    position: absolute;
    bottom: 0;
    right: 8%;
    width: 72px;
    height: 100px;
    background: radial-gradient(ellipse 24px 40px at 50% 30%, #fff 0%, #f0f0f0 60%, transparent 61%),
        linear-gradient(180deg, transparent 40%, #5a9e4a 40%, #3d7a32 100%);
    border-radius: 50% 50% 10% 10%;
    opacity: 0.95;
    z-index: 3;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* --- Cột phải: chọn kinh --- */
.pray-modal__tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.pray-modal__tab {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.85);
    color: #fff;
    font-size: 13px;
    padding: 10px 12px;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s, border-color 0.2s;
    line-height: 1.3;
}

.pray-modal__tab:hover {
    border-color: #477827;
    color: #b8e0a0;
}

.pray-modal__tab.is-active {
    background: #477827;
    border-color: #477827;
    color: #fff;
}

.pray-modal__tabs .pray-modal__tab:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.pray-modal__text-wrap {
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

.pray-modal__text-wrap::-webkit-scrollbar {
    width: 6px;
}

.pray-modal__text-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
}

.pray-modal__text {
    font-size: 15px;
    line-height: 1.75;
    white-space: pre-line;
    color: #f2f2f2;
}

/* Nến sáng khi mở modal */
.modal-pray.show .pray-modal__candle::before {
    animation-duration: 1.8s;
}

@media (max-width: 991px) {
    .pray-modal__grid {
        grid-template-columns: 1fr;
    }

    .pray-modal__left {
        min-height: auto;
        padding-bottom: 24px;
    }

    .pray-modal__candle {
        display: none;
    }

    .pray-modal__flower {
        right: 4%;
        width: 56px;
        height: 80px;
    }

    .pray-modal__tabs {
        grid-template-columns: 1fr;
    }

    .pray-modal__text-wrap {
        max-height: 40vh;
    }
}

@media (max-width: 576px) {
    .modal-pray .modal-content.pray-modal__content {
        padding: 40px 14px 20px;
    }

    .pray-modal__name {
        font-size: 17px;
    }
}
