/**
 * Cookie Consent Modal Styles
 * Uses Bulbasoft Client lightbox as base
 */

/* Cookie type enable/disable checkboxes in admin */
.bsftcookies-enable-checkbox {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.bsftcookies-enable-checkbox label {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 5px;
}

.bsftcookies-enable-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.bsftcookies-enable-checkbox .description {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* IMPORTANT: Hide close button for mandatory consent on first visit only */
/* When reopening for changes, close button should be available */
body.bsftcookies-first-visit #bsftui-root .bsftui-dialog .bsftui-close {
    display: none !important;
}

/* Floating "Change Consent" button */
.bsftcookies-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    font-family: inherit;
}

.bsftcookies-floating-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.bsftcookies-floating-btn:active {
    background: #1e40af;
    transform: translateY(0);
}

.bsftcookies-floating-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.bsftcookies-btn-text {
    white-space: nowrap;
}

/* Debug Toast */
.bsftcookies-debug-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    width: min(420px, calc(100vw - 32px));
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.bsftcookies-debug-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bsftcookies-debug-toast.is-success {
    border-color: #86efac;
    background: #f0fdf4;
}

.bsftcookies-debug-toast.is-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.bsftcookies-debug-toast-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
}

.bsftcookies-debug-toast-message,
.bsftcookies-debug-toast-details {
    font-size: 13px;
    line-height: 1.5;
}

.bsftcookies-debug-toast-details {
    margin-top: 8px;
    color: #4b5563;
}

/* Modal Container */
.bsftcookies-modal-container {
    padding: 0;
}

.bsftcookies-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.bsftcookies-modal-header h2 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

.bsftcookies-modal-header p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.bsftcookies-modal-body {
    padding: 24px;
}

.bsftcookies-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.bsftcookies-modal-footer p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.bsftcookies-modal-footer a {
    color: #2563eb;
    text-decoration: underline;
}

/* Simple Choice Section */
.bsftcookies-simple-choice p {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Detailed Settings */
.bsftcookies-detailed-settings {
    margin-top: 16px;
}

.bsftcookies-detailed-settings > p {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Cookie Types List */
.bsftcookies-cookie-types {
    margin-bottom: 24px;
}

.bsftcookies-cookie-type {
    padding: 16px;
    margin-bottom: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.bsftcookies-cookie-type:last-child {
    margin-bottom: 0;
}

.bsftcookies-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 8px;
}

.bsftcookies-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

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

.bsftcookies-checkbox-title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    flex: 1;
}

.bsftcookies-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #065f46;
    background: #d1fae5;
    border-radius: 4px;
    text-transform: uppercase;
}

.bsftcookies-cookie-description {
    margin: 0 0 0 32px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* Button Group */
.bsftcookies-button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.bsftcookies-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bsftcookies-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Primary Button */
.bsftcookies-btn-primary {
    color: #ffffff;
    background: #2563eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bsftcookies-btn-primary:hover {
    background: #1d4ed8;
}

.bsftcookies-btn-primary:active {
    background: #1e40af;
}

/* Secondary Button */
.bsftcookies-btn-secondary {
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bsftcookies-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.bsftcookies-btn-secondary:active {
    background: #f3f4f6;
}

/* Link Button */
.bsftcookies-btn-link {
    color: #2563eb;
    background: transparent;
    padding: 12px 16px;
}

.bsftcookies-btn-link:hover {
    color: #1d4ed8;
    background: #eff6ff;
}

.bsftcookies-btn-link:active {
    color: #1e40af;
}

/* Responsive */
@media (max-width: 640px) {
    .bsftcookies-debug-toast {
        right: 16px;
        bottom: 16px;
        width: calc(100vw - 32px);
    }

    .bsftcookies-modal-header {
        padding: 20px 16px 12px;
    }
    
    .bsftcookies-modal-header h2 {
        font-size: 20px;
    }
    
    .bsftcookies-modal-body {
        padding: 20px 16px;
    }
    
    .bsftcookies-modal-footer {
        padding: 12px 16px;
    }
    
    .bsftcookies-button-group {
        flex-direction: column;
    }
    
    .bsftcookies-btn {
        width: 100%;
    }
    
    .bsftcookies-cookie-description {
        margin-left: 0;
        margin-top: 8px;
    }
    
    /* Floating button on mobile */
    .bsftcookies-floating-btn {
        bottom: 16px;
        left: 16px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .bsftcookies-floating-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Compact version - only icon */
    .bsftcookies-floating-btn .bsftcookies-btn-text {
        display: none;
    }
    
    .bsftcookies-floating-btn {
        width: 48px;
        height: 48px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .bsftcookies-modal-header,
    .bsftcookies-modal-body {
        background: #1f2937;
    }
    
    .bsftcookies-modal-header h2 {
        color: #f9fafb;
    }
    
    .bsftcookies-modal-header p,
    .bsftcookies-cookie-description {
        color: #9ca3af;
    }
    
    .bsftcookies-modal-footer {
        background: #111827;
        border-top-color: #374151;
    }
    
    .bsftcookies-cookie-type {
        background: #111827;
        border-color: #374151;
    }
    
    .bsftcookies-checkbox-title {
        color: #f9fafb;
    }
    
    .bsftcookies-btn-secondary {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .bsftcookies-btn-secondary:hover {
        background: #4b5563;
    }
}
