/* Frontend CSS for Cookie Banner - Modern Design Based on Instituto Francis */

:root {
    --cc-headings-color: #ffffff;
    --cc-banner-bg: #2b2b2b;
    --cc-text-color: #ffffff;
    --cc-link-color: #b8b8b8;
    --cc-accept-bg: #4caf50;
    --cc-accept-hover: #45a049;
    --cc-reject-bg: transparent;
    --cc-reject-border: #ffffff;
    --cc-settings-bg: #e0e0e0;
    --cc-settings-text: #2b2b2b;
    --cc-checkbox-color: #4caf50;
    --cc-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* Banner Container */
.cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: var(--cc-banner-bg);
    box-shadow: var(--cc-shadow);
    animation: cc-slide-up 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cc-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cc-banner.cc-hiding {
    animation: cc-slide-down 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cc-slide-down {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cc-banner-container {
    max-width: 100%;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Content Area */
.cc-banner-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cc-banner-text {
    flex: 1;
}

.cc-banner-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cc-text-color);
}

.cc-banner-description a {
    color: var(--cc-link-color);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cc-banner-description a:hover {
    color: var(--cc-text-color);
}

/* Settings Panel (Collapsible) */
.cc-settings-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cc-banner-bg);
    padding: 30px 40px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: var(--cc-shadow);
    z-index: 999998;
}

.cc-settings-panel.cc-active {
    display: block;
    animation: cc-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cc-settings-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--cc-text-color);
}

.cc-settings-close {
    background: transparent;
    border: none;
    color: var(--cc-text-color);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.cc-settings-close:hover {
    opacity: 0.7;
}

/* Categories */
.cc-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.cc-category-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.cc-category-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cc-category-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.cc-category-checkbox {
    margin: 2px 10px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--cc-checkbox-color);
}

.cc-category-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cc-category-name {
    flex: 1;
    font-size: 15px;
    color: var(--cc-text-color);
}

.cc-required {
    font-size: 12px;
    color: var(--cc-link-color);
    font-weight: normal;
    font-style: italic;
}

.cc-category-description {
    margin: 8px 0 0 28px;
    font-size: 13px;
    color: var(--cc-link-color);
    line-height: 1.5;
}

/* Actions */
.cc-banner-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.cc-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cc-btn:active {
    transform: translateY(0);
}

/* Accept Button (Green) */
.cc-btn-accept {
    background: var(--cc-accept-bg);
    color: #fff;
    border: 2px solid var(--cc-accept-bg);
}

.cc-btn-accept:hover {
    background: var(--cc-accept-hover);
    border-color: var(--cc-accept-hover);
}

/* Reject Button (Transparent with border) */
.cc-btn-reject {
    background: var(--cc-reject-bg);
    color: var(--cc-text-color);
    border: 2px solid var(--cc-reject-border);
}

.cc-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Settings Button (Light grey) */
.cc-btn-settings {
    background: var(--cc-settings-bg);
    color: var(--cc-settings-text);
    border: 2px solid var(--cc-settings-bg);
}

.cc-btn-settings:hover {
    background: #d0d0d0;
    border-color: #d0d0d0;
}

/* Settings Panel Actions */
.cc-settings-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    justify-content: flex-end;
}

/* Reopen Banner Button */
#cc-reopen-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999998;
    padding: 12px 24px;
    background: var(--cc-banner-bg);
    color: var(--cc-text-color);
    border: 2px solid var(--cc-text-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

#cc-reopen-banner:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media screen and (max-width: 992px) {
    .cc-banner-container {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 20px;
    }
    
    .cc-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cc-banner-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cc-btn {
        width: 100%;
    }
    
    .cc-settings-panel {
        padding: 20px;
    }
    
    .cc-categories {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 576px) {
    .cc-banner-container {
        padding: 15px;
    }
    
    .cc-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    #cc-reopen-banner {
        bottom: 10px;
        left: 10px;
        font-size: 12px;
        padding: 8px 16px;
    }
}

/* Accessibility */
.cc-btn:focus,
.cc-category-checkbox:focus {
    outline: 2px solid var(--cc-checkbox-color);
    outline-offset: 2px;
}

/* Print */
@media print {
    .cc-banner,
    .cc-settings-panel,
    #cc-reopen-banner {
        display: none !important;
    }
}