/**
 * NB Cookie Consent Pro - Base Styles
 * Common styles shared across all display types
 * Version: 1.8.9
 */

/* Container Base */
#cookie-consent-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* RTL/LTR Direction */
#cookie-consent-container.cookie-consent-rtl {
    direction: rtl;
    text-align: right;
}

#cookie-consent-container.cookie-consent-ltr {
    direction: ltr;
    text-align: left;
}

/* Overlay (used by Modal and Sidebar) */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0007;
    z-index: 999998;
}

/* Content Box (default) */
.cookie-consent-content {
    position: relative;
    padding: 24px 32px;
    border-radius: 8px;
    max-width: 500px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 0 auto;
    z-index: 1000000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
}

/* Banner Title (Optional) */
.cookie-consent-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}

.cookie-consent-ltr .cookie-consent-title {
    text-align: left;
}

.cookie-consent-rtl .cookie-consent-title {
    text-align: right;
}

/* Message Text - DYNAMIC VARIABLE will be injected by PHP */
.cookie-consent-message {
    margin: 0 0 15px 0;
    line-height: 1.6;
    font-weight: 400;
}

.cookie-consent-ltr .cookie-consent-message {
    direction: ltr;
    text-align: left !important;
}

.cookie-consent-rtl .cookie-consent-message {
    direction: rtl;
    text-align: right !important;
}

/* Privacy Links */
.cookie-consent-privacy-links {
    margin: 0 0 18px 0;
    text-align: center;
    font-size: 12px;
}

.cookie-consent-ltr .cookie-consent-privacy-links {
    text-align: center;
}

.cookie-consent-rtl .cookie-consent-privacy-links {
    text-align: center;
}

.cookie-consent-privacy-links a {
    color: #666;
    text-decoration: underline;
    transition: color 0.2s ease;
    font-weight: 400;
}

.cookie-consent-privacy-links a:hover {
    color: #1e40af;
}

.cookie-consent-privacy-links .link-separator {
    color: #ccc;
    margin: 0 8px;
    font-weight: normal;
}

.cookie-consent-privacy-links .manage-preferences {
    cursor: pointer;
}

/* ========================================
   BUTTONS CONTAINER - Base Styles
   ======================================== */
.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
}

/* ========================================
   BUTTON BASE STYLES
   All buttons inherit these by default
   DYNAMIC COLORS will be injected by PHP
   ======================================== */
.cookie-consent-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0 0 auto;
    flex-shrink: 0;
    min-width: 100px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* ========================================
   BUTTON MODE: 1 Button (Accept Only)
   Custom CSS can override these
   ======================================== */
.cookie-consent-buttons.button-mode-1 {
    justify-content: center;
}

.cookie-consent-buttons.button-mode-1 button {
    margin: 0 auto;
    display: flex;
    min-width: 200px;
    max-width: 300px;
}

/* ========================================
   BUTTON MODE: 2 Buttons (Accept + Reject)
   Custom CSS can override these
   ======================================== */
.cookie-consent-buttons.button-mode-2 {
    justify-content: space-between;
}

.cookie-consent-buttons.button-mode-2 button {
    flex: 1;
}

/* ========================================
   BUTTON MODE: 3 Buttons (Accept + Reject + Customize)
   Custom CSS can override these
   ======================================== */
.cookie-consent-buttons.button-mode-3 {
    justify-content: space-between;
}

.cookie-consent-buttons.button-mode-3 button {
    flex: 1;
}

.cookie-consent-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-consent-buttons button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.cookie-consent-buttons button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Category Mode Button Styling */
.cookie-consent-buttons .button-secondary {
    opacity: 0.8;
}

.cookie-consent-buttons .button-secondary:hover {
    opacity: 1;
}

/* Category Checkboxes */
.cookie-consent-categories {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.category-item {
    display: flex;
    align-items: flex-start;
    margin: 10px 0;
    cursor: pointer;
    padding: 8px;
    border-radius: 3px;
    transition: background 0.2s;
}

.category-item:hover {
    background: #e9ecef;
}

.category-item input[type="checkbox"] {
    margin-top: 3px;
    margin-right: 10px;
    margin-left: 10px;
    cursor: pointer;
}

.category-item input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.category-label {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
}

/* Close (X) Button - ALL display types */
.cookie-consent-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
}

/* RTL: Move X button to left */
.cookie-consent-rtl .cookie-consent-close {
    right: auto;
    left: 15px;
}

.cookie-consent-close:hover {
    background: #f0f0f0;
    color: #333;
    transform: scale(1.1);
}

.cookie-consent-close:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
    background: #f0f0f0;
}

.cookie-consent-close:active {
    transform: scale(0.95);
}

/* Mobile Responsive - Base */
@media (max-width: 600px) {
    .cookie-consent-content {
        margin: 10px;
        padding: 18px 16px;
        padding-top: 40px; /* Extra space for close button */
        max-width: 100%;
    }

    .cookie-consent-buttons {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .cookie-consent-buttons button {
        padding: 10px 14px;
        font-size: 12px;
        flex-shrink: 1;
        min-width: 80px;
    }

    /* Mobile: 1-button mode - make button wider */
    .cookie-consent-buttons.button-mode-1 button {
        min-width: 180px;
        max-width: 250px;
    }
}
