/* ============================================================
   CASA-SIP — Legal Modals CSS
   Politica de Confidentialitate / Termeni / Cookie
   ============================================================ */

/* ── Overlay ── */
.lm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lm-overlay.lm-visible {
    opacity: 1;
    visibility: visible;
}

/* ── Modal Box ── */
.lm-modal {
    background: #0f1923;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 158, 11, 0.1);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
    scroll-behavior: smooth;
}
.lm-modal.lm-modal-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Custom scrollbar */
.lm-modal::-webkit-scrollbar { width: 6px; }
.lm-modal::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
.lm-modal::-webkit-scrollbar-thumb { background: rgba(245, 158, 11, 0.4); border-radius: 3px; }

/* ── Header ── */
.lm-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #dc2626 0%, #f59e0b 100%);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 20px 20px 0 0;
}
.lm-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}
.lm-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}
.lm-title {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 4px;
    line-height: 1.2;
}
.lm-updated {
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    margin: 0;
}
.lm-close-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.lm-close-btn:hover { background: rgba(255,255,255,0.3); }

/* ── Body ── */
.lm-body {
    padding: 30px 28px;
}

/* ── Intro paragraph ── */
.lm-intro {
    color: rgba(255,255,255,0.75);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 0 28px;
    padding: 20px;
    background: rgba(245, 158, 11, 0.06);
    border-left: 3px solid #f59e0b;
    border-radius: 0 10px 10px 0;
}

/* ── Sections ── */
.lm-sections { display: flex; flex-direction: column; gap: 4px; }

.lm-section {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    transition: border-color 0.2s;
}
.lm-section:hover { border-color: rgba(245, 158, 11, 0.25); }

.lm-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f59e0b;
    margin: 0;
    padding: 14px 18px;
    background: rgba(245, 158, 11, 0.06);
    cursor: pointer;
    letter-spacing: 0.01em;
}

.lm-section-body {
    padding: 16px 18px 18px;
    background: rgba(255,255,255,0.02);
}

/* ── Text elements inside body ── */
.lm-para {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    line-height: 1.75;
    margin: 0 0 10px;
}
.lm-para-intro {
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0 0 6px;
}
.lm-list {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    line-height: 1.75;
    margin: 0 0 10px;
    padding-left: 20px;
}
.lm-list li { margin-bottom: 5px; }
.lm-list-num { list-style: decimal; }

/* ── Table ── */
.lm-table-wrap { overflow-x: auto; margin: 8px 0; }
.lm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}
.lm-table tr:nth-child(odd) td { background: rgba(255,255,255,0.04); }
.lm-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.lm-table tr:first-child td {
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

/* ── Footer CTA ── */
.lm-footer-cta {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap;
}
.lm-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #dc2626, #f59e0b);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
}
.lm-cta-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.lm-close-text {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.lm-close-text:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ── Footer link style overrides ── */
.footer-bottom-links a[id^="lm-open"] { cursor: pointer; }
.footer-bottom-links a[id^="lm-open"]:hover { color: #f59e0b !important; }

/* ── Mobile ── */
@media (max-width: 600px) {
    .lm-modal { border-radius: 16px 16px 0 0; max-height: 96vh; }
    .lm-overlay { padding: 0; align-items: flex-end; }
    .lm-header { padding: 18px 20px; border-radius: 16px 16px 0 0; }
    .lm-title { font-size: 1.1rem; }
    .lm-body { padding: 22px 18px; }
    .lm-footer-cta { flex-direction: column; align-items: stretch; }
    .lm-cta-btn, .lm-close-text { text-align: center; justify-content: center; }
}

/* ── Loading spinner ── */
.lm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}
.lm-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(245, 158, 11, 0.2);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: lm-spin 0.7s linear infinite;
}
@keyframes lm-spin { to { transform: rotate(360deg); } }
