/* Modal Backdrop */
.bcc-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    animation: bccFadeIn 0.3s ease-out;
}

/* Modal Container */
.bcc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    animation: bccSlideIn 0.3s ease-out;
    overflow: hidden;
}

.bcc-modal.bcc-dark {
    background: #2c3e50;
    color: #ecf0f1;
}

/* Modal Header */
.bcc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.bcc-dark .bcc-modal-header {
    border-bottom-color: #34495e;
}

.bcc-logo {
    font-size: 18px;
    font-weight: 700;
    color: #1a5490;
    max-width: 150px;
}

.bcc-logo img,
.bcc-logo .custom-logo,
.bcc-logo .custom-logo-link img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

.bcc-powered {
    font-size: 12px;
    color: #666;
}

.bcc-dark .bcc-powered {
    color: #95a5a6;
}

/* Tabs */
.bcc-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.bcc-dark .bcc-tabs {
    background: #34495e;
    border-bottom-color: #2c3e50;
}

.bcc-tab {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
}

.bcc-tab:hover {
    background: rgba(0, 0, 0, 0.03);
}

.bcc-tab.active {
    color: #1a5490;
    border-bottom-color: #1a5490;
    background: #fff;
}

.bcc-dark .bcc-tab {
    color: #95a5a6;
}

.bcc-dark .bcc-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: #2c3e50;
}

/* Tab Content */
.bcc-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.bcc-tab-panel {
    display: none;
}

.bcc-tab-panel.active {
    display: block;
}

.bcc-tab-panel h2 {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 700;
}

.bcc-description {
    margin: 0 0 25px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.bcc-dark .bcc-description {
    color: #bdc3c7;
}

/* Cookie Categories */
.bcc-cookie-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.bcc-category {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
}

.bcc-dark .bcc-category {
    background: #34495e;
    border-color: #2c3e50;
}

.bcc-category-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.bcc-category-name {
    font-size: 15px;
    font-weight: 600;
}

/* Toggle Switch */
.bcc-toggle {
    position: relative;
    width: 50px;
    height: 28px;
}

.bcc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bcc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.bcc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.bcc-toggle input:checked + .bcc-toggle-slider {
    background-color: #1a5490;
}

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

.bcc-toggle-disabled .bcc-toggle-slider {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Detail Sections */
.bcc-detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.bcc-dark .bcc-detail-section {
    border-bottom-color: #34495e;
}

.bcc-detail-section:last-child {
    border-bottom: none;
}

.bcc-detail-section h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.bcc-detail-section p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.bcc-dark .bcc-detail-section p {
    color: #bdc3c7;
}

.bcc-policy-link {
    color: #1a5490;
    text-decoration: underline;
    font-weight: 600;
}

.bcc-dark .bcc-policy-link {
    color: #3498db;
}

/* Modal Footer */
.bcc-modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.bcc-dark .bcc-modal-footer {
    background: #34495e;
    border-top-color: #2c3e50;
}

.bcc-btn {
    flex: 1;
    padding: 12px 24px;
    border: 2px solid #1a5490;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
}

.bcc-btn-outline {
    background: transparent;
    color: #1a5490;
}

.bcc-btn-outline:hover {
    background: rgba(26, 84, 144, 0.1);
}

.bcc-btn-primary {
    background: #1a5490;
    color: #fff;
    border-color: #1a5490;
}

.bcc-btn-primary:hover {
    background: #154070;
    border-color: #154070;
}

.bcc-dark .bcc-btn-outline {
    border-color: #3498db;
    color: #3498db;
}

.bcc-dark .bcc-btn-outline:hover {
    background: rgba(52, 152, 219, 0.1);
}

.bcc-dark .bcc-btn-primary {
    background: #3498db;
    border-color: #3498db;
}

.bcc-dark .bcc-btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

/* Animations */
@keyframes bccFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bccSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes bccShake {
    0%, 100% { transform: translate(-50%, -50%); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-48%, -50%); }
    20%, 40%, 60%, 80% { transform: translate(-52%, -50%); }
}

.bcc-shake {
    animation: bccShake 0.5s;
}

/* Responsive */
@media (max-width: 768px) {
    .bcc-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .bcc-modal-header,
    .bcc-modal-footer,
    .bcc-tab-content {
        padding: 15px 20px;
    }
    
    .bcc-cookie-categories {
        grid-template-columns: 1fr;
    }
    
    .bcc-modal-footer {
        flex-direction: column;
    }
    
    .bcc-tabs {
        font-size: 13px;
    }
    
    .bcc-tab {
        padding: 12px 10px;
    }
}

/* Banner Layout Variations (PRO) */

/* Bottom Bar Layout */
.bcc-modal.bcc-layout-bottom-bar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    animation: bccSlideUp 0.3s ease-out;
}

@keyframes bccSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Floating Layout (Bottom Right) */
.bcc-modal.bcc-layout-floating {
    top: auto;
    bottom: 20px;
    left: auto;
    right: 20px;
    transform: none;
    width: 400px;
    max-width: calc(100vw - 40px);
    max-height: 600px;
    animation: bccSlideInRight 0.3s ease-out;
}

@keyframes bccSlideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide-in Layout (Right Side) */
.bcc-modal.bcc-layout-slide-in {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    transform: none;
    width: 450px;
    max-width: 90vw;
    max-height: 100vh;
    border-radius: 0;
    animation: bccSlideInRight 0.3s ease-out;
}

/* Full Overlay Layout */
.bcc-modal.bcc-layout-full-overlay {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    animation: bccFadeIn 0.3s ease-out;
}

.bcc-modal.bcc-layout-full-overlay .bcc-tab-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive adjustments for layouts */
@media (max-width: 768px) {
    .bcc-modal.bcc-layout-floating,
    .bcc-modal.bcc-layout-slide-in {
        width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 8px 8px 0 0;
    }
    
    .bcc-modal.bcc-layout-floating {
        max-height: 80vh;
    }
}
