/**
 * ITBS Performance Optimizer - Cookie Consent Styles
 * Developed by Niloy (+8801947527775)
 */

/* === Cookie Banner Container === */
#itbs-cookie-banner {
    position: fixed;
    z-index: 999999;
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    animation: itbs-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

/* Positions */
#itbs-cookie-banner.itbs-cookie-bottom {
    bottom: 0;
    top: auto;
}

#itbs-cookie-banner.itbs-cookie-top {
    top: 0;
    bottom: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    animation: itbs-slide-in-top 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#itbs-cookie-banner.itbs-cookie-bottom-left,
#itbs-cookie-banner.itbs-cookie-bottom-right {
    width: auto;
    max-width: 480px;
    bottom: 20px;
    top: auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#itbs-cookie-banner.itbs-cookie-bottom-left {
    left: 20px;
    right: auto;
    animation: itbs-slide-in-left 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#itbs-cookie-banner.itbs-cookie-bottom-right {
    right: 20px;
    left: auto;
    animation: itbs-slide-in-right 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Animations */
@keyframes itbs-slide-in {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes itbs-slide-in-top {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes itbs-slide-in-left {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes itbs-slide-in-right {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* === Inner Container === */
.itbs-cookie-inner {
    padding: 20px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* === Dark Theme === */
#itbs-cookie-banner.itbs-cookie-dark {
    background: #1e1b4b;
    color: #e2e8f0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#itbs-cookie-banner.itbs-cookie-dark .itbs-cookie-text h3 {
    color: #f1f5f9;
}

#itbs-cookie-banner.itbs-cookie-dark .itbs-cookie-text p {
    color: #94a3b8;
}

#itbs-cookie-banner.itbs-cookie-dark .itbs-cookie-settings-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#itbs-cookie-banner.itbs-cookie-dark .itbs-cookie-category {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

#itbs-cookie-banner.itbs-cookie-dark .itbs-cookie-required {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

/* === Light Theme === */
#itbs-cookie-banner.itbs-cookie-light {
    background: #ffffff;
    color: #1e293b;
    border-top: 1px solid #e2e8f0;
}

#itbs-cookie-banner.itbs-cookie-light .itbs-cookie-text h3 {
    color: #1e293b;
}

#itbs-cookie-banner.itbs-cookie-light .itbs-cookie-text p {
    color: #64748b;
}

#itbs-cookie-banner.itbs-cookie-light .itbs-cookie-settings-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

#itbs-cookie-banner.itbs-cookie-light .itbs-cookie-category {
    border-bottom-color: #e2e8f0;
}

/* === Classic Theme === */
#itbs-cookie-banner.itbs-cookie-classic {
    background: #2d3748;
    color: #e2e8f0;
    border-top: 3px solid #6366f1;
}

#itbs-cookie-banner.itbs-cookie-classic .itbs-cookie-text h3 {
    color: #ffffff;
}

/* === Content Layout === */
.itbs-cookie-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.itbs-cookie-icon {
    color: #6366f1;
    flex-shrink: 0;
    margin-top: 2px;
}

.itbs-cookie-text h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.itbs-cookie-text p {
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

.itbs-cookie-text a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

.itbs-cookie-text a:hover {
    text-decoration: underline;
}

/* === Settings Panel === */
.itbs-cookie-settings-panel {
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.itbs-cookie-categories {
    display: flex;
    flex-direction: column;
}

.itbs-cookie-category {
    padding: 14px 0;
    border-bottom: 1px solid;
}

.itbs-cookie-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.itbs-cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.itbs-cookie-category-header strong {
    font-size: 14px;
    font-weight: 600;
}

.itbs-cookie-category p {
    font-size: 12px;
    margin: 0;
    opacity: 0.7;
    line-height: 1.5;
}

.itbs-cookie-required {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 8px;
}

/* === Toggle Switch === */
.itbs-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.itbs-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.itbs-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.itbs-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.itbs-switch input:checked + .itbs-slider {
    background-color: #6366f1;
}

.itbs-switch input:checked + .itbs-slider:before {
    transform: translateX(20px);
}

.itbs-switch-disabled .itbs-slider {
    cursor: not-allowed;
    background-color: #6366f1;
    opacity: 0.6;
}

/* === Actions === */
.itbs-cookie-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.itbs-cookie-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    line-height: 1;
    white-space: nowrap;
    outline: none;
}

.itbs-cookie-btn:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.itbs-cookie-btn-accept {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.itbs-cookie-btn-accept:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.itbs-cookie-btn-decline {
    background: transparent;
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

.itbs-cookie-btn-decline:hover {
    border-color: #94a3b8;
    color: inherit;
}

.itbs-cookie-btn-settings {
    background: transparent;
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.3);
}

.itbs-cookie-btn-settings:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: #6366f1;
}

/* === Responsive === */
@media (max-width: 768px) {
    .itbs-cookie-inner {
        padding: 16px;
    }

    .itbs-cookie-content {
        flex-direction: column;
        gap: 10px;
    }

    .itbs-cookie-icon {
        display: none;
    }

    .itbs-cookie-actions {
        justify-content: stretch;
    }

    .itbs-cookie-btn {
        flex: 1;
        text-align: center;
    }

    #itbs-cookie-banner.itbs-cookie-bottom-left,
    #itbs-cookie-banner.itbs-cookie-bottom-right {
        width: calc(100% - 32px);
        max-width: none;
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}
