#popup-sdk-modal {
    font-family: Arial, sans-serif;
    padding: 20px;
    box-sizing: border-box;
}

/* CONTAINER */
.policy-consent-modal {
    position: relative;
    background: #fff;
    border-radius: 12px;

    /* 👇 giới hạn 90% màn hình */
    width: 90%;
    max-width: 600px;
    height: auto;
    max-height: 90vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: popupFadeIn 0.25s ease;
}

/* animation */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* close button */
.policy-consent-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    z-index: 2;
}
.policy-consent-close:hover {
    color: #000;
}

/* header */
.policy-consent-title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin: 20px 20px 10px;
    color: #222;
}

/* body scroll riêng */
.policy-consent-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

.policy-consent-body p {
    margin-bottom: 10px;
}

/* table */
.policy-consent-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.policy-consent-table td {
    border: 1px solid #ddd;
    padding: 10px;
    vertical-align: top;
}

.policy-consent-table tr:hover {
    background: #f9f9f9;
}

/* checkbox */
input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
    accent-color: #007bff;
}

/* confirm row */
.policy-confirm-row {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    font-weight: 500;
}

/* footer (luôn cố định dưới) */
.policy-consent-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background: #fff;

    position: sticky;
    bottom: 0;
}

/* buttons */
.policy-consent-actions button {
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

#policy-consent-skip {
    background: #eee;
}
#policy-consent-skip:hover {
    background: #ddd;
}

#policy-consent-accept {
    background: #007bff;
    color: #fff;
}
#policy-consent-accept:hover {
    background: #0056b3;
}
#policy-consent-accept:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* error */
.popup-error {
    background: #ffe6e6;
    color: #cc0000;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin: 10px 20px 0;
}

/* MOBILE */
@media (max-width: 600px) {
    #popup-sdk-modal {
        padding: 10px;
    }

    .policy-consent-modal {
        width: 80%;
        max-width: 600px;
        max-height: 90vh;

        display: flex;
        flex-direction: column;

        border-radius: 12px;
        overflow: hidden;
    }

    .policy-consent-title {
        font-size: 16px;
    }

    .policy-consent-body {
        flex: 1;
        overflow-y: auto;

        padding: 0 16px;
        -webkit-overflow-scrolling: touch; /* 👈 mượt iOS */
    }

    .policy-consent-actions {
        padding: 12px 15px;
    }
}