/**
 * Cookie Consent Banner & Modal Styles
 * 
 * @package The_Brandsmen_Cookie_Consent
 */

.tbcc-banner {
    position: fixed;
    left: 0;
    right: 0;
    background: var(--tbcc-banner-bg, #ffffff);
    color: var(--tbcc-banner-text, #333333);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    padding: 20px;
    display: none;
    animation: tbccSlideIn 0.4s ease-out;
}

.tbcc-banner.tbcc-bottom {
    bottom: 0;
}

.tbcc-banner.tbcc-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tbcc-banner.tbcc-show {
    display: block;
}

@keyframes tbccSlideIn {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tbcc-banner.tbcc-top.tbcc-show {
    animation: tbccSlideInTop 0.4s ease-out;
}

@keyframes tbccSlideInTop {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tbcc-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tbcc-banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.tbcc-settings-link {
    color: inherit !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease;
}

.tbcc-settings-link:hover {
    opacity: 0.8;
    text-decoration: underline !important;
}

.tbcc-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tbcc-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tbcc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tbcc-btn-accept {
    background: var(--tbcc-accept-bg, #4CAF50);
    color: var(--tbcc-accept-text, #ffffff);
}

.tbcc-btn-reject {
    background: var(--tbcc-reject-bg, #f44336);
    color: var(--tbcc-reject-text, #ffffff);
}

.tbcc-btn-settings {
    background: var(--tbcc-settings-bg, #2196F3);
    color: var(--tbcc-settings-text, #ffffff);
}

/* Modal */
.tbcc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tbcc-modal.tbcc-show {
    display: flex;
    animation: tbccFadeIn 0.3s ease-out;
}

@keyframes tbccFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tbcc-modal-content {
    background: #ffffff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: tbccScaleIn 0.3s ease-out;
}

@keyframes tbccScaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.tbcc-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tbcc-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.tbcc-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tbcc-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.tbcc-modal-body {
    padding: 24px;
}

.tbcc-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Modal Button Overrides */
.tbcc-modal-accept-all { background-color: var(--tbcc-modal-accept-bg, #4CAF50) !important; color: var(--tbcc-modal-accept-text, #ffffff) !important; }

.tbcc-modal-save { background-color: var(--tbcc-modal-save-bg, #607D8B) !important; color: var(--tbcc-modal-save-text, #ffffff) !important; }

.tbcc-category {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.tbcc-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tbcc-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tbcc-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.tbcc-category-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.tbcc-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.tbcc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.tbcc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.tbcc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.tbcc-toggle input:checked + .tbcc-toggle-slider {
    background-color: var(--tbcc-toggle-active-bg, var(--tbcc-accept-bg, #4CAF50));
}

.tbcc-toggle input:checked + .tbcc-toggle-slider:before {
    transform: translateX(24px);
}

.tbcc-toggle input:disabled + .tbcc-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.tbcc-always-active {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .tbcc-banner-container {
        padding: 0 10px;
        flex-direction: column;
        text-align: center;
    }
    
    .tbcc-banner-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .tbcc-banner-text {
        font-size: 13px;
    }
    
    .tbcc-modal {
        padding: 10px;
    }
    
    .tbcc-modal-content {
        max-height: 90vh;
    }
    
    .tbcc-modal-header,
    .tbcc-modal-body,
    .tbcc-modal-footer {
        padding: 16px;
    }
    
    .tbcc-modal-footer {
        flex-direction: column;
    }
    
    .tbcc-modal-footer .tbcc-btn {
        width: 100%;
    }
}

@media print {
    .tbcc-banner,
    .tbcc-modal {
        display: none !important;
    }
}
