/* Cookie Consent Banner - fully isolated from user theme */
.sm-cookie-banner {
    all: initial !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999999 !important;
    background: #1e1e1e !important;
    color: #ffffff !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
    
}

.sm-cookie-banner *,
.sm-cookie-banner *::before,
.sm-cookie-banner *::after {
    box-sizing: border-box !important;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
    color: inherit !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    font-style: normal !important;
    pointer-events: auto !important;
}

.sm-cookie-banner-inner {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px 24px !important;
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    flex-wrap: wrap !important;
}

.sm-cookie-banner-text {
    flex: 1 !important;
    min-width: 280px !important;
}

.sm-cookie-banner-text p {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.sm-cookie-policy-link {
    color: #8ab4f8 !important;
    text-decoration: underline !important;
    margin-top: 6px !important;
    display: inline-block !important;
    font-size: 13px !important;
}

.sm-cookie-policy-link:hover {
    color: #aecbfa !important;
}

.sm-cookie-banner-actions {
    display: flex !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    flex-wrap: wrap !important;
}

/* Buttons */
.sm-cookie-btn {
    all: initial !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    white-space: nowrap !important;
    display: inline-block !important;
    line-height: 1.5 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.sm-cookie-btn-accept {
    background: #0066cc !important;
    color: #fff !important;
}

.sm-cookie-btn-accept:hover {
    background: #0052a3 !important;
}

.sm-cookie-btn-necessary {
    background: transparent !important;
    color: #f0f0f0 !important;
    border: 1px solid #555 !important;
}

.sm-cookie-btn-necessary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.sm-cookie-btn-customize {
    background: transparent !important;
    color: #8ab4f8 !important;
    border: 1px solid #8ab4f8 !important;
}

.sm-cookie-btn-customize:hover {
    background: rgba(138, 180, 248, 0.1) !important;
}

/* Modal */
.sm-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
}

.sm-cookie-modal *,
.sm-cookie-modal *::before,
.sm-cookie-modal *::after {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
}

.sm-cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.sm-cookie-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.sm-cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.sm-cookie-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1e1e1e;
}

.sm-cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.sm-cookie-modal-close:hover {
    color: #1e1e1e;
}

.sm-cookie-modal-body {
    padding: 20px 24px;
}

.sm-cookie-modal-desc {
    color: #666;
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
}

/* Category rows */
.sm-cookie-category {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

.sm-cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 16px;
}

.sm-cookie-category-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sm-cookie-category-info strong {
    color: #1e1e1e;
    font-size: 14px;
}

.sm-cookie-category-desc {
    color: #888;
    font-size: 12px;
}

/* Toggle in modal (reuse theme toggle styles) */
.sm-cookie-modal .sm-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.sm-cookie-modal .sm-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sm-cookie-modal .sm-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

.sm-cookie-modal .sm-toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.sm-cookie-modal .sm-toggle-switch input:checked + .sm-toggle-slider {
    background: #0066cc;
}

.sm-cookie-modal .sm-toggle-switch input:checked + .sm-toggle-slider:before {
    transform: translateX(20px);
}

.sm-cookie-toggle-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.sm-cookie-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

/* Floating settings button */
.sm-cookie-settings-btn {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 999998;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e1e1e;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sm-cookie-settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 600px) {
    .sm-cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
    
    .sm-cookie-banner-actions {
        flex-direction: column;
    }
    
    .sm-cookie-btn {
        width: 100%;
        text-align: center;
    }
    
    .sm-cookie-modal-content {
        width: 95%;
        max-height: 85vh;
    }
}

/* Cookie Policy Page */
.sm-cookie-policy-content {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    padding: 0 150px;
}

.sm-cookie-policy-content h1,
.sm-cookie-policy-content h2,
.sm-cookie-policy-content h3,
.sm-cookie-policy-content h4,
.sm-cookie-policy-content h5,
.sm-cookie-policy-content h6,
.sm-cookie-policy-content p {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
    color: #333 !important;
}

.sm-cookie-policy-back {
    display: inline-block;
    margin-bottom: 24px;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border: 1px solid #ccc;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.2s;
}

.sm-cookie-policy-back:hover {
    background: #f0f0f0;
}

@media (max-width: 1024px) {
    .sm-cookie-policy-content {
        padding: 0 100px;
    }
}

@media (max-width: 600px) {
    .sm-cookie-policy-content {
        padding: 0 10px;
    }
}
