/* ==========================================================================
   MiSynergy Cookie Consent Banner & Preferences Modal
   Styled in accordance with WSO2-inspired enterprise FinTech design
   Brand Colors: #ff5017 (Orange), #184469 (Navy Blue)
   ========================================================================== */

/* Main Fixed Bottom Banner */
.misyn-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -10px 35px rgba(11, 25, 44, 0.08);
    z-index: 999999;
    padding: 20px 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transform: translateY(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
    visibility: hidden;
}

.misyn-cookie-banner.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.misyn-cookie-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Left Content Area */
.misyn-cookie-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    max-width: 820px;
}

.misyn-cookie-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 50%;
    border: 2px solid #184469;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    overflow: hidden;
}

.misyn-cookie-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.misyn-cookie-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: #334155;
    margin: 0;
}

.misyn-cookie-text a {
    color: #0b192c;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.misyn-cookie-text a:hover {
    color: #ff5017;
}

/* Actions Right Area */
.misyn-cookie-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.misyn-btn-cookie {
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 11px 22px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.2;
}

/* 1. Settings button: white bg, orange border, orange text */
.misyn-btn-cookie-settings {
    background: #ffffff;
    border-color: #ff5017;
    color: #ff5017;
}

.misyn-btn-cookie-settings:hover {
    background: #fff5f2;
    border-color: #e04410;
    color: #e04410;
}

/* 2. Reject button: Solid Navy Blue */
.misyn-btn-cookie-reject {
    background: #184469;
    border-color: #184469;
    color: #ffffff;
}

.misyn-btn-cookie-reject:hover {
    background: #0f2c44;
    border-color: #0f2c44;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 68, 105, 0.2);
}

/* 3. Accept button: Solid Brand Orange */
.misyn-btn-cookie-accept {
    background: #ff5017;
    border-color: #ff5017;
    color: #ffffff;
}

.misyn-btn-cookie-accept:hover {
    background: #e04410;
    border-color: #e04410;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 80, 23, 0.35);
}

/* ==========================================================================
   Cookie Preferences Modal & Backdrop
   ========================================================================== */
.misyn-cookie-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 25, 44, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.misyn-cookie-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.misyn-cookie-modal {
    background: #ffffff;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.misyn-cookie-modal-backdrop.active .misyn-cookie-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.misyn-cookie-modal-header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.misyn-cookie-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0b192c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.misyn-cookie-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.misyn-cookie-modal-close:hover {
    background: #e2e8f0;
    color: #0b192c;
}

/* Modal Body */
.misyn-cookie-modal-body {
    padding: 22px 28px;
    overflow-y: auto;
    max-height: calc(88vh - 160px);
}

.misyn-cookie-modal-intro {
    font-size: 13.5px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 22px;
}

/* Category Cards */
.misyn-cookie-category {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.misyn-cookie-category:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.misyn-cookie-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.misyn-cookie-cat-name {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #0b192c;
    margin: 0;
}

.misyn-cookie-always-active {
    font-size: 12px;
    font-weight: 700;
    color: #184469;
    background: #e0f2fe;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.misyn-cookie-cat-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
    margin: 0;
}

/* iOS Style Switch */
.misyn-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.misyn-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.misyn-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.misyn-switch input:checked + .misyn-slider {
    background-color: #ff5017;
}

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

/* Modal Footer */
.misyn-cookie-modal-footer {
    padding: 16px 28px 20px;
    border-top: 1px solid #eef2f6;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Subtle Floating Badge to Reopen (optional) */
.misyn-cookie-reopen-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #184469;
    font-size: 18px;
    cursor: pointer;
    z-index: 99990;
    transition: all 0.25s ease;
    opacity: 0;
    visibility: hidden;
}

.misyn-cookie-reopen-badge.visible {
    opacity: 0.85;
    visibility: visible;
}

.misyn-cookie-reopen-badge:hover {
    opacity: 1;
    transform: scale(1.1);
    color: #ff5017;
    box-shadow: 0 6px 18px rgba(255, 80, 23, 0.2);
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    .misyn-cookie-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 0 20px;
    }

    .misyn-cookie-content {
        max-width: 100%;
    }

    .misyn-cookie-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .misyn-btn-cookie {
        flex: 1 1 auto;
        padding: 10px 16px;
        font-size: 11.5px;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .misyn-cookie-banner {
        padding: 16px 0;
    }

    .misyn-cookie-content {
        gap: 14px;
    }

    .misyn-cookie-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .misyn-cookie-icon img {
        width: 22px;
        height: 22px;
    }

    .misyn-cookie-text {
        font-size: 12.5px;
    }

    .misyn-cookie-actions {
        flex-direction: column;
        width: 100%;
    }

    .misyn-btn-cookie {
        width: 100%;
    }

    .misyn-cookie-modal-header,
    .misyn-cookie-modal-body,
    .misyn-cookie-modal-footer {
        padding: 18px 20px;
    }

    .misyn-cookie-modal-footer {
        flex-direction: column;
    }

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

