/********************************************************************************************
 *                                                                                           *
 *   ██████╗░██╗░░░██╗░██████╗░█████╗░██████╗░███████╗░█████╗░████████╗██╗██╗░░░██╗███████╗  *
 *   ██╔══██╗██║░░░██║██╔════╝██╔══██╗██╔══██╗██╔════╝██╔══██╗╚══██╔══╝██║██║░░░██║██╔════╝  *
 *   ██████╔╝██║░░░██║╚█████╗░██║░░╚═╝██████╔╝█████╗░░███████║░░░██║░░░██║╚██╗░██╔╝█████╗░░  *
 *   ██╔══██╗██║░░░██║░╚═══██╗██║░░██╗██╔══██╗██╔══╝░░██╔══██║░░░██║░░░██║░╚████╔╝░██╔══╝░░  *
 *   ██║░░██║╚██████╔╝██████╔╝╚█████╔╝██║░░██║███████╗██║░░██║░░░██║░░░██║░░╚██╔╝░░███████╗  *
 *   ╚═╝░░╚═╝░╚═════╝░╚═════╝░░╚════╝░╚═╝░░╚═╝╚══════╝╚═╝░░╚═╝░░░╚═╝░░░╚═╝░░░╚═╝░░░╚══════╝  *
 *                                                                              © 2013-2026  *
 * ----------------------------------------------------------------------------------------- *
 * This is commercial software, only users who have purchased a valid license and accept     *
 * to the terms of the License Agreement can install and use this program.                   *
 * ----------------------------------------------------------------------------------------- *
 * www: https://ruscreative.com                                                              *
 * email: info@ruscreative.com                                                               *
 * @license       Commercial                                                                 *
 * @copyright (C) 2013-2026 RusCreative.com | All rights reserved.                           *
 ********************************************************************************************/
/* =============================================================================
   mod_rcm_cookie — cookie-banner.css
   All colours and dimensions come from CSS custom properties set inline on the
   root banner element. No hardcoded colours. No Bootstrap, no jQuery, no CDN.
   ============================================================================= */

/* ── Root banner wrapper ──────────────────────────────────────────────────── */
.rcm-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: var(--rcm-cookie-z, 1040);
    background: var(--rcm-cookie-bg, #1f1f1f);
    color: var(--rcm-cookie-text, #fff);
    box-shadow: var(--rcm-cookie-shadow, 0 -2px 8px rgba(0, 0, 0, .3));
    font-size: var(--rcm-cookie-font-size, 0.95rem);
    font-family: var(--rcm-cookie-font-family, inherit);
    border-radius: var(--rcm-cookie-radius, 0px);
    box-sizing: border-box;
    line-height: 1.5;
}

/* Position modifiers */
.rcm-cookie-banner--bottom {
    bottom: 0;
    top: auto;
}

.rcm-cookie-banner--top {
    top: 0;
    bottom: auto;
    /* Invert default shadow direction for top position */
    box-shadow: var(--rcm-cookie-shadow, 0 2px 8px rgba(0, 0, 0, .3));
}

/* ── Inner content wrapper (handles full vs container width) ─────────────── */
.rcm-cookie-banner__inner {
    padding: var(--rcm-cookie-padding, 1rem 1.5rem);
    box-sizing: border-box;
}

.rcm-cookie-banner__inner--full {
    width: 100%;
}

.rcm-cookie-banner__inner--container {
    max-width: var(--rcm-cookie-max-width, 960px);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* ── Body: text + actions side by side, wrapping on small screens ────────── */
.rcm-cookie-banner__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

/* ── Text block ──────────────────────────────────────────────────────────── */
.rcm-cookie-banner__text {
    /* basis 0 so the text shares the row with the actions (grows to fill the
       left), instead of claiming its full content width and pushing the
       buttons onto a second line. */
    flex: 1 1 0;
    min-width: 200px;
    color: var(--rcm-cookie-text, #fff);
}

.rcm-cookie-banner__text a {
    color: var(--rcm-cookie-link, #7db3e8);
    text-decoration: underline;
}

.rcm-cookie-banner__text a:hover,
.rcm-cookie-banner__text a:focus-visible {
    opacity: 0.85;
}

/* Document links sub-block (when links_position=after_text) */
.rcm-cookie-banner__links {
    margin-top: 0.35rem;
    font-size: inherit;
}

/* ── Action buttons ──────────────────────────────────────────────────────── */
/* Default: text on the left (grows to fill), buttons on the right of the SAME
   row — the action group is sized to its content and does not stretch. The
   body's flex row keeps them side by side within the inner container; the
   <480px block below stacks them full-width for large tap targets. */
.rcm-cookie-banner__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.rcm-cookie-banner__btn {
    cursor: pointer;
    /* transparent 1px border keeps the filled (accept) and outline (reject) buttons the same height */
    border: 1px solid transparent;
    border-radius: var(--rcm-cookie-btn-radius, 4px);
    padding: 0.5rem 1.25rem;
    font-size: inherit;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.rcm-cookie-banner__btn:hover {
    opacity: 0.85;
}

.rcm-cookie-banner__btn:focus-visible {
    outline: 3px solid #ffd400;
    outline-offset: 2px;
}

.rcm-cookie-banner__btn--accept {
    background: var(--rcm-cookie-btn-accept-bg, #2e7d32);
    color: var(--rcm-cookie-btn-accept-text, #fff);
}

/* Outline style: white fill, border and text share the reject "text" colour. */
.rcm-cookie-banner__btn--reject {
    background: var(--rcm-cookie-btn-reject-bg, #fff);
    color: var(--rcm-cookie-btn-reject-text, #1a1a1a);
    border-color: var(--rcm-cookie-btn-reject-text, #1a1a1a);
}

/* ── Hide animation ──────────────────────────────────────────────────────── */
.rcm-cookie-banner--hiding {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.rcm-cookie-banner--bottom.rcm-cookie-banner--hiding {
    transform: translateY(100%);
}

.rcm-cookie-banner--top.rcm-cookie-banner--hiding {
    transform: translateY(-100%);
}

/* Respect user motion preferences — instant hide */
@media (prefers-reduced-motion: reduce) {
    .rcm-cookie-banner--hiding {
        transition: none;
    }
}

/* ── Responsive: hard stack below 768px ──────────────────────────────────── */
/* Жёсткая раскладка: текст сверху, .rcm-cookie-banner__actions полной ширины
   под ним, кнопки — строго в СТОЛБЕЦ (без авто-wrap «строка → столбец»). */
@media (max-width: 767.98px) {
    .rcm-cookie-banner__body {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .rcm-cookie-banner__text {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }

    .rcm-cookie-banner__actions {
        width: 100%;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
    }

    .rcm-cookie-banner__btn {
        width: 100%;
        flex: 0 0 auto;
        text-align: center;
    }
}
