/* Cookie Consent Banner Styling */
#yam-cookie-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.45) !important;
    z-index: 99998 !important;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

#yam-cookie-banner,
#yam-cookie-banner * {
    box-sizing: border-box !important;
}

#yam-cookie-banner {
    position: fixed !important;
    z-index: 99999 !important;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Desktop popup: centered modal (>= 768px) */
@media (min-width: 768px) {
    #yam-cookie-banner {
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        max-width: 480px !important;
        background: #ffffff !important;
        border-radius: 24px !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        padding: 30px 28px 26px !important;
        text-align: center !important;
    }

    .yam-cookie-emoji {
        font-size: 38px;
        line-height: 1;
        margin-bottom: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .yam-cookie-title {
        font-size: 19px;
        font-weight: 700;
        color: #222222;
        margin: 0 0 12px;
        line-height: 1.3;
    }

    .yam-cookie-desc {
        font-size: 14px;
        line-height: 1.5;
        color: #555555;
        margin-bottom: 22px;
    }

    .yam-cookie-desc a {
        color: #5B9BD5 !important;
        text-decoration: underline !important;
        font-weight: 600;
        transition: color 0.2s;
    }

    .yam-cookie-desc a:hover {
        color: #3b7bb5 !important;
    }

    .yam-cookie-buttons {
        display: flex;
        gap: 12px;
        justify-content: center;
    }

    .yam-cookie-btn {
        flex: 1;
        height: 44px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: all 0.2s ease;
        border: none;
        outline: none;
        padding: 0 16px;
    }

    .yam-cookie-btn-primary {
        background-color: #5B9BD5;
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(91, 155, 213, 0.35);
    }

    .yam-cookie-btn-primary:hover {
        background-color: #4a8ac4;
        box-shadow: 0 6px 16px rgba(91, 155, 213, 0.45);
        color: #ffffff;
    }

    .yam-cookie-btn-secondary {
        background-color: #f0f2f5;
        color: #444444;
        border: 1px solid #e2e5e8;
    }

    .yam-cookie-btn-secondary:hover {
        background-color: #e4e7ea;
        color: #222222;
    }
}

/* Mobile bottom sheet (< 768px) */
@media (max-width: 767px) {
    #yam-cookie-modal-overlay {
        background: rgba(0, 0, 0, 0.25) !important;
    }

    #yam-cookie-banner {
        top: auto !important;
        bottom: 10px !important;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        transform: none !important;
        background: #ffffff !important;
        border-radius: 18px !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        padding: 16px 14px 14px !important;
        text-align: center !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
    }

    .yam-cookie-emoji {
        font-size: 26px;
        line-height: 1;
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .yam-cookie-title {
        font-size: 15px;
        font-weight: 700;
        color: #222222;
        margin: 0 0 6px;
        line-height: 1.25;
    }

    .yam-cookie-desc {
        font-size: 12px;
        line-height: 1.35;
        color: #555555;
        margin-bottom: 12px;
        padding: 0 2px;
    }

    .yam-cookie-desc a {
        color: #5B9BD5 !important;
        text-decoration: underline !important;
        font-weight: 600;
        word-break: break-word;
    }

    .yam-cookie-buttons {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .yam-cookie-btn {
        flex: 1;
        min-width: 0;
        height: 42px;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        outline: none;
        padding: 0 4px;
        text-align: center;
        text-transform: none;
    }

    .yam-cookie-btn-primary {
        background-color: #5B9BD5;
        color: #ffffff;
        box-shadow: 0 2px 8px rgba(91, 155, 213, 0.3);
    }

    .yam-cookie-btn-secondary {
        background-color: #f4f6f8;
        color: #444444;
        border: 1px solid #dce1e6;
    }

    body.yam-cookie-open .bottom_phone_mobile,
    body.yam-cookie-open #whatsapp-button,
    body.yam-cookie-open .contactus-button,
    body.yam-cookie-open .button_contactus_mobile {
        bottom: 170px !important;
        transition: bottom 0.3s ease;
    }
}

/* General safety for any article table on mobile */
.editor table {
    max-width: 100% !important;
}
@media (max-width: 767px) {
    .editor table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}
