/*
Theme Name: Saborlista Theme - CMP Styles
Description: Стили для CMP (Consent Management Platform)
Version: 1.0.0
*/

/* Unified Custom Banner Styles for CMP */
/* Adapted from provided "Consent Banner Styles" */

#custom-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    /* Full width handled by left/right */
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    /* Dark background */
    color: #fff;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    /* Animation from user snippet */
    animation: cmpSlideUpFade 0.35s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

/* Exit animation class */
#custom-banner.cmp-hide-banner {
    animation: cmpSlideDownFade 0.35s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

@keyframes cmpSlideUpFade {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cmpSlideDownFade {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(100%);
    }
}

/* Content wrapper */
#custom-banner .banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Text styles */
#custom-banner p {
    margin: 0 0 1rem 0;
    padding: 0;
    width: 100%;
    font-size: 1.4rem;
    line-height: 1.4;
}

/* Links in text */
#custom-banner a {
    color: #4a9eff;
    text-decoration: underline;
    font-size: 1.4rem;
    transition: color 0.2s;
}

#custom-banner a:hover {
    color: #6bb3ff;
}

/* Button container */
#custom-banner .banner-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    /* Stack on mobile */
}

/* Options container (for granular) */
#custom-banner .banner-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    flex-wrap: wrap;
    justify-content: center;
    color: #fff;
}

#custom-banner .banner-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Checkbox styling adjustment */
#custom-banner .banner-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4a9eff;
}

/* Unified Button Styles */
#custom-banner button {
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 4px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    margin: 0;

    /* Default Primary Style (Blue) */
    background: #4a9eff;
    color: #fff;
    border-color: #4a9eff;
}

#custom-banner button:hover {
    background: #3a8eef;
    border-color: #3a8eef;
}

#custom-banner button:focus {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

/* Secondary Button (Save Settings) - Transparent Style */
#custom-banner #custom-banner-save {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

#custom-banner #custom-banner-save:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}


/* Privacy Link (Floating button) */
#cmp-privacy-link {
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 9999;
    /* Below banner but high */
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 7px;
    border-radius: 50%;
    /* Circular icon by default */
    font-size: 1.4rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    transition: all 0.1s ease;
    width: 36px;
    /* Fixed width for icon */
    height: 36px;
    /* Fixed height for icon */
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}

#cmp-privacy-link svg {
    flex-shrink: 0;
}

#cmp-privacy-link span {
    opacity: 0;
    margin-left: 0;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
    pointer-events: none;
}

#cmp-privacy-link:hover {
    background-color: #fff;
    color: #000;
    width: auto;
    padding: 8px 8px;
    border-radius: 20px;
    max-width: 300px;
}

#cmp-privacy-link:hover span {
    opacity: 1;
    margin-left: 4px;
    pointer-events: auto;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    #custom-banner {
        padding: 1.5rem;
    }

    #custom-banner .banner-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        /* Align items vertically */
        text-align: left;
        flex-wrap: wrap;
        /* Allow wrapping if content is too wide */
    }

    #custom-banner p {
        margin: 0;
        text-align: left;
        margin-right: 2rem;
        flex: 1;
        /* Take available space */
        min-width: 300px;
        /* Prevent text from being too squashed */
    }

    /* Reset styles for p inside wrapper to avoid double margins */
    #custom-banner .banner-text-wrapper p {
        margin-right: 0;
        min-width: 0;
        flex: none;
    }

    #custom-banner .banner-text-wrapper {
        flex: 1;
        margin-right: 2rem;
        margin-bottom: 0;
        text-align: left;
    }

    #custom-banner .banner-actions {
        width: auto;
        flex-shrink: 0;
    }

    #custom-banner .banner-options {
        margin-bottom: 0;
        margin-right: 2rem;
        justify-content: flex-start;
    }
}