/**
 * Local Consent Gate - Frontend Styles
 * Version: 1.1.0
 */

/* ==========================================================================
   Consent Banner
   ========================================================================== */

.lcg-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1.25rem 1rem;
    z-index: 99999;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #212529;
}

.lcg-banner__content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.lcg-banner__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1 1 100%;
}

.lcg-banner__text {
    margin: 0;
    flex: 1 1 auto;
    min-width: 200px;
    color: #495057;
}

.lcg-banner__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.lcg-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: 1px solid #6c757d;
    background: #ffffff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.lcg-btn:hover {
    opacity: 0.9;
}

.lcg-btn:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.lcg-btn--accept-all {
    background: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

.lcg-btn--accept-all:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
}

.lcg-btn--reject {
    background: #6c757d;
    color: #ffffff;
    border-color: #6c757d;
}

.lcg-btn--reject:hover {
    background: #5c636a;
    border-color: #565e64;
}

.lcg-btn--customize {
    background: #ffffff;
    color: #212529;
    border-color: #ced4da;
}

.lcg-btn--customize:hover {
    background: #e9ecef;
}

.lcg-btn--save {
    background: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

.lcg-btn--save:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
}

.lcg-btn--withdraw {
    background: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
}

.lcg-btn--withdraw:hover {
    background: #bb2d3b;
    border-color: #b02a37;
}

/* ==========================================================================
   Preferences Modal
   ========================================================================== */

.lcg-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #212529;
}

.lcg-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.lcg-modal__content {
    background: #ffffff;
    border-radius: 8px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1;
    padding: 1.75rem;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.lcg-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.lcg-modal__header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.lcg-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    color: #6c757d;
    transition: color 0.15s ease;
}

.lcg-modal__close:hover {
    color: #212529;
}

.lcg-modal__body {
    margin-bottom: 1.25rem;
}

.lcg-modal__body p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #495057;
}

.lcg-modal__footer {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

/* ==========================================================================
   Toggle Switches
   ========================================================================== */

.lcg-toggle-group {
    margin: 1rem 0;
}

.lcg-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.lcg-toggle:last-child {
    margin-bottom: 0;
}

.lcg-toggle input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
}

.lcg-toggle input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.lcg-toggle label {
    cursor: pointer;
    flex: 1;
    font-weight: 500;
}

.lcg-toggle input[type="checkbox"]:disabled + label {
    cursor: not-allowed;
}

.lcg-always-on {
    font-weight: 400;
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
}

.lcg-sensitive-note {
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
    margin-left: 0.25rem;
}

/* ==========================================================================
   Persistent Settings Button
   ========================================================================== */

.lcg-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99998;
    background: #0d6efd;
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.lcg-settings-btn:hover {
    background: #0b5ed7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lcg-settings-btn:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Shortcode variant - static positioning */
.lcg-settings-btn--shortcode {
    position: static;
    box-shadow: none;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 600px) {
    .lcg-banner__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .lcg-banner__actions {
        width: 100%;
        flex-direction: column;
    }

    .lcg-banner__actions .lcg-btn {
        width: 100%;
    }

    .lcg-modal__content {
        width: 95%;
        padding: 1.25rem;
        max-height: 90vh;
    }

    .lcg-modal__footer {
        flex-direction: column;
    }

    .lcg-modal__footer .lcg-btn {
        width: 100%;
    }

    .lcg-settings-btn {
        bottom: 10px;
        left: 10px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lcg-btn,
    .lcg-modal__close,
    .lcg-settings-btn {
        transition: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .lcg-banner,
    .lcg-modal,
    .lcg-settings-btn {
        display: none !important;
    }
}