/* ==========================================================================
   LearnBladesmithing Cookie Compliance - Banner Styles
   ========================================================================== */

/* Reset & Base */
.lbcc-banner *,
.lbcc-preferences *,
.lbcc-revoke * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.lbcc-hidden {
    display: none !important;
}

/* ==========================================================================
   Cookie Banner (Bottom Bar)
   ========================================================================== */

.lbcc-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    background: var(--lbcc-bg, #1a1a2e);
    color: var(--lbcc-text, #fff);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lbcc-banner--bottom {
    bottom: 0;
}

.lbcc-banner.lbcc-visible {
    transform: translateY(0);
}

.lbcc-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.lbcc-banner__content {
    flex: 1;
    min-width: 280px;
}

.lbcc-banner__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--lbcc-text, #fff);
}

.lbcc-banner__message {
    font-size: 13px;
    opacity: 0.9;
    color: var(--lbcc-text, #fff);
}

.lbcc-banner__link {
    color: var(--lbcc-settings-text, #e94560);
    text-decoration: underline;
}

.lbcc-banner__link:hover {
    opacity: 0.8;
}

.lbcc-banner__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.lbcc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    font-family: inherit;
    line-height: 1.4;
}

.lbcc-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.lbcc-btn:active {
    transform: translateY(0);
}

.lbcc-btn--accept {
    background: var(--lbcc-accept-bg, #e94560);
    color: var(--lbcc-accept-text, #fff);
}

.lbcc-btn--decline {
    background: var(--lbcc-decline-bg, transparent);
    color: var(--lbcc-decline-text, #fff);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.lbcc-btn--settings {
    background: var(--lbcc-settings-bg, transparent);
    color: var(--lbcc-settings-text, #e94560);
    border: 1px solid var(--lbcc-settings-text, #e94560);
}

/* ==========================================================================
   Preferences Panel (Modal)
   ========================================================================== */

.lbcc-preferences {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
}

.lbcc-preferences__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.lbcc-preferences__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #333;
    border-radius: 12px;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: lbcc-slide-up 0.3s ease;
}

@keyframes lbcc-slide-up {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.lbcc-preferences__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.lbcc-preferences__header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.lbcc-preferences__close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.lbcc-preferences__close:hover {
    background: #f0f0f0;
    color: #333;
}

.lbcc-preferences__body {
    overflow-y: auto;
    padding: 16px 24px;
    flex: 1;
}

/* Category items */
.lbcc-category {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.lbcc-category:last-child {
    border-bottom: none;
}

.lbcc-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.lbcc-category__info {
    flex: 1;
}

.lbcc-category__name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.lbcc-category__required {
    font-size: 11px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lbcc-category__desc {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
    line-height: 1.5;
}

/* Toggle Switch */
.lbcc-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.lbcc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.lbcc-toggle__slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s;
}

.lbcc-toggle__slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lbcc-toggle input:checked + .lbcc-toggle__slider {
    background: var(--lbcc-accept-bg, #e94560);
}

.lbcc-toggle input:checked + .lbcc-toggle__slider::before {
    transform: translateX(22px);
}

.lbcc-toggle input:disabled + .lbcc-toggle__slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Preferences footer */
.lbcc-preferences__footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

/* ==========================================================================
   Revoke Consent Button
   ========================================================================== */

.lbcc-revoke {
    position: fixed;
    z-index: 999998;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--lbcc-bg, #1a1a2e);
    color: var(--lbcc-text, #fff);
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0.85;
}

.lbcc-revoke:hover {
    opacity: 1;
    transform: scale(1.05);
}

.lbcc-revoke--bottom-left {
    bottom: 16px;
    left: 16px;
}

.lbcc-revoke--bottom-right {
    bottom: 16px;
    right: 16px;
}

.lbcc-revoke svg {
    flex-shrink: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .lbcc-banner__inner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 14px;
    }

    .lbcc-banner__actions {
        flex-direction: column;
    }

    .lbcc-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .lbcc-preferences__panel {
        width: 96%;
        max-height: 90vh;
    }

    .lbcc-revoke span {
        display: none;
    }

    .lbcc-revoke {
        padding: 10px;
        border-radius: 50%;
    }
}

/* ==========================================================================
   Accessibility: Focus styles
   ========================================================================== */

.lbcc-btn:focus-visible,
.lbcc-toggle input:focus-visible + .lbcc-toggle__slider,
.lbcc-preferences__close:focus-visible,
.lbcc-revoke:focus-visible {
    outline: 2px solid #4A90D9;
    outline-offset: 2px;
}

/* Screen reader only */
.lbcc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
