/* ==========================================================================
   BULL AGRO - COOKIE CONSENT & PREFERENCE MANAGEMENT SYSTEM
   Full-Width Modern Bar & Enhanced Preference Modal UI
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FULL-WIDTH COOKIE CONSENT BANNER
   -------------------------------------------------------------------------- */
.bullagro-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999990;
    background: rgba(9, 15, 30, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.65);
    padding: 16px 0;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.35s ease,
                visibility 0.35s ease;
}

.bullagro-cookie-banner.bullagro-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.bullagro-cookie-banner.bullagro-hiding {
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.7, 0, 0.84, 0),
                opacity 0.3s ease,
                visibility 0.3s ease;
}

/* Gradient accent line across the top edge */
.bullagro-cookie-top-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d9232d 0%, #ff3b47 30%, #0066cc 70%, #d9232d 100%);
    background-size: 200% 100%;
}

.bullagro-cookie-banner-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-right: 36px;
}

.bullagro-cookie-banner-content {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.bullagro-cookie-icon-wrap {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 35, 45, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
    flex-shrink: 0;
}

.bullagro-cookie-icon-svg {
    width: 28px;
    height: 28px;
}

.bullagro-cookie-text-wrap {
    flex: 1;
}

.bullagro-cookie-header-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.bullagro-cookie-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16.5px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.bullagro-cookie-badge {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.28);
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.bullagro-cookie-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0;
}

.bullagro-cookie-policy-link {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #38bdf8;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    margin-left: 6px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.bullagro-cookie-policy-link:hover {
    color: #7dd3fc;
}

.bullagro-cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.bullagro-cookie-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border: none;
}

.bullagro-cookie-btn:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.bullagro-cookie-btn-accept {
    background: linear-gradient(135deg, #d9232d 0%, #b31822 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(217, 35, 45, 0.45);
}

.bullagro-cookie-btn-accept:hover {
    background: linear-gradient(135deg, #e62833 0%, #c41c26 100%);
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px rgba(217, 35, 45, 0.6);
}

.bullagro-cookie-btn-reject {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9 !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.bullagro-cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.bullagro-cookie-btn-manage {
    background: transparent;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.bullagro-cookie-btn-manage:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.28);
}

.bullagro-cookie-close-btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bullagro-cookie-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.bullagro-cookie-close-btn:focus-visible {
    outline: 2px solid #38bdf8;
}

/* --------------------------------------------------------------------------
   2. SMOOTH ELEVATION OF FLOATING ACTION BUTTONS
   Keeps WhatsApp and Back-To-Top unobstructed while banner is open
   -------------------------------------------------------------------------- */
body.bullagro-cookie-active .whatsapp_float,
body.bullagro-cookie-active .scroll-top1 {
    bottom: 110px !important;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease !important;
}

body.bullagro-cookie-active .scroll-top {
    bottom: 110px !important;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease, opacity 0.3s ease !important;
}

/* --------------------------------------------------------------------------
   3. ENHANCED PREFERENCE MODAL
   -------------------------------------------------------------------------- */
.bullagro-cookie-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 10, 24, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999995;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bullagro-cookie-modal-backdrop.bullagro-modal-open {
    opacity: 1;
    visibility: visible;
}

.bullagro-cookie-modal {
    position: relative;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85),
                0 0 0 1px rgba(217, 35, 45, 0.35);
    transform: scale(0.94) translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    overflow: hidden;
}

.bullagro-cookie-modal-backdrop.bullagro-modal-open .bullagro-cookie-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.bullagro-cookie-modal-header {
    padding: 22px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.9);
}

.bullagro-cookie-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.3px;
}

.bullagro-cookie-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bullagro-cookie-modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.bullagro-cookie-modal-close:focus-visible {
    outline: 2px solid #38bdf8;
}

.bullagro-cookie-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: calc(90vh - 170px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bullagro-cookie-modal-intro {
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0;
}

/* Category item cards */
.bullagro-cookie-cat-card {
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 20px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.bullagro-cookie-cat-card:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.16);
}

.bullagro-cookie-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}

.bullagro-cookie-cat-name {
    font-family: 'Poppins', sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bullagro-cookie-cat-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0;
}

/* Toggle Switch */
.bullagro-cookie-switch-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bullagro-cookie-badge-locked {
    font-family: 'Poppins', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.bullagro-cookie-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    margin: 0;
    cursor: pointer;
}

.bullagro-cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bullagro-cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.bullagro-cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.bullagro-cookie-switch input:checked + .bullagro-cookie-slider {
    background-color: #d9232d;
    box-shadow: 0 0 12px rgba(217, 35, 45, 0.45);
}

.bullagro-cookie-switch input:focus-visible + .bullagro-cookie-slider {
    box-shadow: 0 0 0 2px #38bdf8;
}

.bullagro-cookie-switch input:checked + .bullagro-cookie-slider:before {
    transform: translateX(20px);
}

/* Modal Footer */
.bullagro-cookie-modal-footer {
    padding: 18px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.95);
}

/* --------------------------------------------------------------------------
   4. CONSENT-GATED FUNCTIONAL EMBEDS (E.G. GOOGLE MAPS)
   -------------------------------------------------------------------------- */
.bullagro-gmap-container {
    position: relative;
    width: 100%;
    min-height: 240px;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
}

.bullagro-embed-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0b1528 0%, #15243f 100%);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    text-align: center;
    color: #ffffff;
    z-index: 5;
}

.bullagro-embed-placeholder.bullagro-hidden {
    display: none !important;
}

.bullagro-embed-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(217, 35, 45, 0.15);
    border: 1px solid rgba(217, 35, 45, 0.35);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 8px;
}

.bullagro-embed-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.bullagro-embed-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #94a3b8;
    max-width: 380px;
    margin-bottom: 12px;
    line-height: 1.45;
}

.bullagro-embed-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   5. FOOTER LEGAL LINKS
   -------------------------------------------------------------------------- */
.bullagro-footer-legal-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.bullagro-footer-legal-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bullagro-footer-legal-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.bullagro-footer-legal-sep {
    color: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .bullagro-cookie-banner {
        padding: 16px 0;
    }

    .bullagro-cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-right: 28px;
    }

    .bullagro-cookie-banner-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .bullagro-cookie-banner-actions .bullagro-cookie-btn {
        flex: 1;
        min-width: 130px;
        text-align: center;
    }

    .bullagro-cookie-close-btn {
        top: 16px;
        transform: none;
    }

    body.bullagro-cookie-active .whatsapp_float,
    body.bullagro-cookie-active .scroll-top1 {
        bottom: 175px !important;
    }

    body.bullagro-cookie-active .scroll-top {
        bottom: 175px !important;
    }
}

@media (max-width: 576px) {
    .bullagro-cookie-banner-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .bullagro-cookie-banner-actions .bullagro-cookie-btn-manage {
        grid-column: 1 / -1;
    }

    .bullagro-cookie-btn {
        width: 100%;
        padding: 10px 14px;
        font-size: 13px;
    }

    .bullagro-cookie-modal {
        max-height: 94vh;
    }

    .bullagro-cookie-modal-header,
    .bullagro-cookie-modal-body,
    .bullagro-cookie-modal-footer {
        padding: 16px 20px;
    }

    .bullagro-cookie-modal-footer {
        display: flex;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .bullagro-cookie-modal-footer .bullagro-cookie-btn {
        width: 100%;
    }
}
