/* ===== Dialog container ===== */
#dialog-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 1000;
    width: fit-content;
    max-width: min(90vw, 1100px);
    max-height: 90vh;
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
}

/* Backdrop */
#dialog-container::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.create-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 999; /* one below #dialog-container's z-index: 1000 */
}

/* ===== Outer box ===== */
.dialog-content {
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden; 
}

/* ===== Scrollable area ===== */
.dialog-scroll {
    padding: 30px 30px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(90vh - 90px);
    text-align: center;
    box-sizing: border-box;
    scrollbar-gutter: stable;
    border-top-right-radius: 30px; 
}

.dialog-scroll::-webkit-scrollbar-track {
    border-top-right-radius: 30px;
    margin-top: 30px; 
}

/* ===== Typography ===== */
#dialog-title {
    margin: 0 0 10px;
    color: #4792bc;
    font-size: 25px;
    font-weight: 700;
    line-height: 35px;
}

#dialog-message {
    margin: 0 0 20px;
    color: #555;
    font-size: 16px;
    line-height: 25px;

    word-break: break-word;
}

/* ===== Shopping cart dialog positioning ===== */
#shopping-cart-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 1000;

    width: fit-content;       /* ← sizes to content */
    max-width: min(90vw, 1100px);  /* ← but won't exceed this */
    max-height: 90vh;

    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
}

/* ===== Shopping cart popup content ===== */
#shopping-cart-popup {
    padding: 30px;
}

/* ===== Icon ===== */
.dialog-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* ===== Buttons ===== */
#dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;

    padding: 20px 30px 30px;
    background: #fff;

    flex-shrink: 0;
}

.dialog-btn {
    background-color: #4792bc;
    color: white;
    border: none;
    border-radius: 24px;

    padding: 8px 20px;
    font-size: 18px;
    font-weight: 900;

    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;

    text-transform: uppercase;
    letter-spacing: 1.8px;
    min-width: 80px;
}

.dialog-btn:hover {
    background-color: #3a7a9f;
    transform: translateY(-1px);
}

/* ===== Optional scrollbar styling ===== */
.dialog-scroll::-webkit-scrollbar {
    width: 10px;
}

.dialog-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid transparent;
    background-clip: padding-box;
}

@media (max-width: 480px) {
    #shopping-cart-popup table {
        width: 100% !important;
    }

    #shopping-cart-popup .dialog-btn {
        font-size: 13px;
        padding: 8px 6px;
        letter-spacing: 0.8px;
    }

    #shopping-cart-popup {
        padding: 20px;
    }
    
    #shopping-cart-dialog {
        min-width: 85vw;
    }

    #shopping-cart-popup td a.btn-continue-shopping,
    #shopping-cart-popup td a.btn-proceed-to-cart {
        padding: 0 5px;
    }

    #shopping-cart-popup td:has(.btn-continue-shopping),
    #shopping-cart-popup td:has(.btn-proceed-to-cart) {
        padding: 10px 5px 0;
    }

    #dialog-container {
        min-width: 85vw;
    }
}