/* =============================================
   Юрист24 — Modal & Paywall Styles
   ============================================= */

/* ===== Modal Overlay ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay--visible {
    display: flex;
}

/* ===== Modal Box ===== */
.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal__icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.modal__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal__text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal__price {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.modal__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== Modal Buttons ===== */
.modal__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.modal__btn:active {
    transform: scale(0.98);
}

.modal__btn--ai {
    background: var(--accent-color);
    color: #fff;
}

.modal__btn--ai:hover {
    background: var(--accent-hover);
}

.modal__btn--lawyer {
    background: rgba(52, 211, 153, 0.15);
    color: #34D399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.modal__btn--lawyer:hover {
    background: rgba(52, 211, 153, 0.25);
}

.modal__btn--pay {
    background: var(--accent-color);
    color: #fff;
    font-size: 16px;
    padding: 16px 24px;
}

.modal__btn--pay:hover {
    background: var(--accent-hover);
}

/* ===== Lawyer Button under AI messages ===== */
.msg__lawyer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 14px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: var(--radius-md);
    color: #34D399;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.msg__lawyer-btn:hover {
    background: rgba(52, 211, 153, 0.2);
}

/* ===== Success Toast ===== */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #34D399;
    color: #0B132B;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    z-index: 300;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to   { opacity: 0; pointer-events: none; }
}

/* ===== Mobile adjustments ===== */
@media (max-width: 480px) {
    .modal {
        padding: 24px 16px;
    }
    .modal__title {
        font-size: 18px;
    }
    .modal__price {
        font-size: 28px;
    }
}
