﻿

/* ── overlay ── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(3px);
    z-index: 1500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 16px 0;
    animation: fadeIn .25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── popup card ── */
.popup {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 540px;
    padding: 28px 28px 32px;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
    position: relative;
    animation: slideUp .3s cubic-bezier(.34,1.3,.64,1);
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* screen switching */
.popcookscreen {
    display: none;
}

    .popcookscreen.active {
        display: block;
        animation: fadeSlide .22s ease;
    }

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── header row ── */
.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.popup-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

    .popup-title .icon {
        width: 32px;
        height: 32px;
        background: #e8f5ee;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 17px;
    }

.btncook-close {
    width: 32px;
    height: 32px;
    background: #f4f5f7;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    transition: background .15s;
}

    .btncook-close:hover {
        background: #ebebeb;
    }

/* ── body text ── */
.popup-body {
    font-size: 13.5px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 6px;
}

.privacy-link {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 13px;
    color: #1a6b3c;
    text-decoration: none;
    font-weight: 600;
}

    .privacy-link:hover {
        text-decoration: underline;
    }

/* ── buttons ── */
.btncook {
    display: block;
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all .18s;
    border: none;
    margin-bottom: 10px;
}

    .btncook:last-child {
        margin-bottom: 0;
    }

.btncook-primary {
    background: #1a6b3c;
    color: #fff;
}

    .btncook-primary:hover {
        background: #155a32;
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(26,107,60,0.3);
    }

.btncook-outline {
    background: #fff;
    color: #333;
    border: 1.5px solid #e0e0e0;
}

    .btncook-outline:hover {
        background: #f7f7f7;
        border-color: #ccc;
    }

.btncook-ghost {
    background: none;
    color: #888;
    border: none;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    padding: 8px;
}

    .btncook-ghost:hover {
        color: #1a6b3c;
    }

/* ── divider ── */
.divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0 18px;
}

/* ── toggle rows ── */
.cookie-list {
    border: 1.5px solid #eeeeee;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
}

.cookie-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-bottom: 1px solid #f3f3f3;
    gap: 12px;
}

    .cookie-row:last-child {
        border-bottom: none;
    }

.cookie-label {
    font-size: 13px;
    color: #2a2a2a;
    font-weight: 500;
    text-align: right;
    flex: 1;
}

/* toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

    .toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    inset: 0;
    background: #d0d0d0;
    border-radius: 24px;
    transition: background .2s;
    cursor: pointer;
}

    .slider::before {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        right: 3px;
        bottom: 3px;
        background: #fff;
        border-radius: 50%;
        transition: transform .2s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

.toggle input:checked + .slider {
    background: #1a6b3c;
}

    .toggle input:checked + .slider::before {
        transform: translateX(-20px);
    }

.toggle input:disabled + .slider {
    background: #1a6b3c;
    opacity: 0.55;
    cursor: not-allowed;
}

    .toggle input:disabled + .slider::before {
        transform: translateX(-20px);
    }

/* ── screen 3 success ── */
.success-icon {
    width: 64px;
    height: 64px;
    background: #e8f5ee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 28px;
}

.success-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.success-body {
    text-align: center;
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 24px;
}

/* demo page bg */
.demo-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    color: #888;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
}

    .demo-page h1 {
        font-size: 22px;
        color: #333;
        font-weight: 700;
    }

.reopen-btn {
    margin-top: 16px;
    padding: 10px 24px;
    background: #1a6b3c;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

    .reopen-btn:hover {
        background: #155a32;
    }
