/* ═══════════════════════════════════════════
   LYN GDPR - Cookie Consent Banner
   ═══════════════════════════════════════════ */

/* Banner overlay */
.lyn-cookie-banner {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
}

/* Backdrop */
.lyn-cookie-banner__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Main panel */
.lyn-cookie-banner__panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 620px;
    width: 100%;
    padding: 2rem;
    max-height: 85vh;
    overflow-y: auto;
}

/* Icon */
.lyn-cookie-banner__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    margin-bottom: 1rem;
}

/* Title */
.lyn-cookie-banner__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.5rem;
}

/* Description text */
.lyn-cookie-banner__text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #555;
    margin: 0 0 1.25rem;
}
.lyn-cookie-banner__text a {
    color: #667eea;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lyn-cookie-banner__text a:hover {
    color: #764ba2;
}

/* ─── Configuration Panel ─── */
.lyn-cookie-banner__config {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-bottom: 1rem;
}

.lyn-cookie-banner__category {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.lyn-cookie-banner__category:last-child {
    border-bottom: none;
}

.lyn-cookie-banner__cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.lyn-cookie-banner__cat-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1a1a2e;
}
.lyn-cookie-banner__cat-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}
.lyn-cookie-banner__cat-label input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: default;
}

.lyn-cookie-banner__cat-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
}
.lyn-cookie-banner__cat-badge--always {
    background: #e8f5e9;
    color: #2e7d32;
}

.lyn-cookie-banner__cat-desc {
    font-size: 0.8rem;
    color: #777;
    line-height: 1.5;
    margin: 0.35rem 0 0 1.75rem;
}

/* ─── Buttons ─── */
.lyn-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lyn-cookie-banner__btn {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 0.7rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.lyn-cookie-banner__btn--accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.lyn-cookie-banner__btn--accept:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.lyn-cookie-banner__btn--reject {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}
.lyn-cookie-banner__btn--reject:hover {
    background: #eee;
}

.lyn-cookie-banner__btn--configure {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
}
.lyn-cookie-banner__btn--configure:hover {
    background: rgba(102, 126, 234, 0.06);
}

.lyn-cookie-banner__btn--save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    width: 100%;
}
.lyn-cookie-banner__btn--save:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ─── Floating re-open button ─── */
.lyn-cookie-reopen {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lyn-cookie-reopen:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ─── Footer bottom row alignment ─── */
.ct-footer [data-row="bottom"] > div {
    --grid-template-columns: 1fr 1fr auto !important;
    align-items: center;
}
.ct-footer [data-row="bottom"] [data-column="widget-area-4"] {
    --horizontal-alignment: center !important;
    justify-content: center !important;
    align-items: center !important;
}
.ct-footer [data-row="bottom"] [data-column="widget-area-4"] .ct-widget {
    margin: 0;
    padding: 0;
}
.ct-footer [data-row="bottom"] [data-column="widget-area-4"] .ct-widget p {
    margin: 0;
    line-height: 1;
}

/* ─── Legal links in copyright bar ─── */
.lyn-legal-links {
    display: inline;
    white-space: nowrap;
}
.lyn-legal-links a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.85em;
    white-space: nowrap;
}
.lyn-legal-links a:hover {
    color: #667eea;
}
.lyn-legal-sep {
    color: rgba(255, 255, 255, 0.25);
    margin: 0 0.5rem;
    font-size: 0.8em;
}

/* ─── Legal pages content ─── */
.lyn-legal {
    max-width: 860px;
    margin: 0 auto;
    padding: 1rem 0 3rem;
    line-height: 1.8;
    color: #333;
}
.lyn-legal__updated {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 2rem;
}
.lyn-legal h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 2rem 0 0.75rem;
}
.lyn-legal h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 1.5rem 0 0.5rem;
}
.lyn-legal p {
    margin: 0 0 1rem;
}
.lyn-legal ul {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}
.lyn-legal li {
    margin-bottom: 0.4rem;
}
.lyn-legal a {
    color: #667eea;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lyn-legal a:hover {
    color: #764ba2;
}
.lyn-legal__table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.875rem;
}
.lyn-legal__table th,
.lyn-legal__table td {
    border: 1px solid #e0e0e0;
    padding: 0.6rem 0.75rem;
    text-align: left;
}
.lyn-legal__table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #1a1a2e;
}
.lyn-legal__table tr:nth-child(even) td {
    background: #fafafa;
}

/* ─── Privacy links in forms ─── */
.lyn-contact__privacy a,
.lyn-quote__privacy a {
    color: #667eea;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lyn-contact__privacy a:hover,
.lyn-quote__privacy a:hover {
    color: #764ba2;
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
    .lyn-cookie-reopen {
        display: none !important;
    }
}

@media (max-width: 690px) {
    .ct-footer [data-row="bottom"] > div {
        --grid-template-columns: 1fr !important;
        text-align: center;
        grid-row-gap: 12px !important;
    }
    .ct-footer [data-row="bottom"] [data-column] {
        --horizontal-alignment: center !important;
        align-items: center !important;
    }
    .lyn-legal-links {
        white-space: normal;
    }
    .lyn-cookie-reopen {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .lyn-cookie-banner__panel {
        padding: 1.25rem 1rem;
        border-radius: 12px 12px 0 0;
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .lyn-cookie-banner__icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        margin-bottom: .75rem;
    }
    .lyn-cookie-banner__icon svg {
        width: 22px;
        height: 22px;
    }
    .lyn-cookie-banner__title {
        font-size: 1.05rem;
        margin-bottom: .5rem;
    }
    .lyn-cookie-banner__text {
        font-size: .8rem;
        line-height: 1.5;
        margin-bottom: .75rem;
    }
    .lyn-cookie-banner__actions {
        flex-direction: column;
        gap: 8px;
    }
    .lyn-cookie-banner__btn {
        min-width: 100%;
        padding: 10px 16px;
        font-size: .85rem;
    }
    .lyn-cookie-banner {
        padding: 0;
        align-items: flex-end;
    }
    .lyn-cookie-banner__category {
        padding: 10px 0;
    }
    .lyn-cookie-banner__cat-desc {
        font-size: .78rem;
    }
}
