
.msland-checkout-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000; 
    display: none;
    padding: 40px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.msland-checkout-popup-wrapper.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.msland-checkout-popup-wrapper .msland-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

.msland-checkout-popup-wrapper .msland-popup-container {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 500px;
    margin: auto;
    border-radius: var(--radius-lg);
    border: 2px solid var(--msland-brand, #355872); 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    animation: msland-popup-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
    overflow: hidden;
}

.msland-popup-top-bar {
    width: 100%;
    background-color: transparent; 
    padding: 8px 12px; 
    text-align: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.msland-popup-top-bar h2 {
    color: var(--msland-brand, #355872) !important; 
    font-size: 0.85rem !important; 
    font-weight: 800 !important;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes msland-popup-slide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.msland-checkout-popup-wrapper .msland-popup-close {
    position: absolute;
    top: 8px; 
    right: 15px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333; 
    z-index: 10;
    transition: opacity 0.2s;
}

.msland-checkout-popup-wrapper .msland-popup-close:hover {
    opacity: 0.7;
}

.msland-checkout-popup-wrapper .msland-popup-content {
    padding: 24px;
    padding-top: 5px; 
}

.msland-checkout-popup-wrapper .msland-popup-header {
    margin-bottom: 0; 
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0; 
    margin-left: -24px; 
    margin-right: -24px;
}

.msland-checkout-popup-wrapper .msland-popup-header p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    margin-top: -2px; 
}

.msland-checkout-popup-wrapper .msland-popup-product-summary {
    background: transparent;
    padding: 0;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.msland-checkout-popup-wrapper .msland-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.msland-checkout-popup-wrapper .msland-summary-item:last-child {
    border-bottom: none;
}

.msland-checkout-popup-wrapper .msland-item-image {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-lg);
    position: relative;
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.msland-checkout-popup-wrapper .msland-item-image img {
    width: 45px !important;
    height: 45px !important;
    max-width: 45px !important;
    max-height: 45px !important;
    object-fit: cover !important;
    border-radius: var(--radius-lg);
}

.msland-checkout-popup-wrapper .msland-item-qty-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    background: var(--msland-brand, #355872);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff;
}

.msland-checkout-popup-wrapper .msland-item-info {
    flex: 1;
}

.msland-checkout-popup-wrapper .msland-item-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: calc(0.75rem * 1.4 * 2);
}

.msland-checkout-popup-wrapper .msland-item-price {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--msland-brand, #355872);
}

.msland-checkout-popup-wrapper .msland-remove-summary-item {
    background: #f3f4f6;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    font-size: 20px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.msland-checkout-popup-wrapper .msland-remove-summary-item:hover {
    color: #ef4444;
    background: #fef2f2;
}

.msland-checkout-popup-wrapper .msland-summary-item.msland-removing {
    position: relative;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.msland-checkout-popup-wrapper .msland-summary-item.msland-removing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid #d1d5db;
    border-top-color: var(--msland-brand, #355872);
    border-radius: 50%;
    animation: msland-remove-spin 0.6s linear infinite;
}

@keyframes msland-remove-spin {
    to { transform: rotate(360deg); }
}

.msland-checkout-popup-wrapper .msland-summary-item.msland-fade-out {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    border: none;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.35s ease 0.05s, padding 0.35s ease 0.05s, margin 0.35s ease 0.05s;
}

.msland-checkout-popup-wrapper .msland-popup-total-bar {
    display: none;
}

.msland-checkout-popup-wrapper .msland-popup-form-container .msland-modular-checkout-wrapper {
    border: none;
    padding: 0;
    background: transparent;
    margin-top: 0;
}

.msland-checkout-popup-wrapper .msland-popup-form-container .msland-checkout-header {
    display: none;
}

@media (max-width: 500px) {
    .msland-checkout-popup-wrapper {
        padding: 20px 10px; 
        display: none; 
        align-items: center; 
    }
    .msland-checkout-popup-wrapper.active {
        display: flex; 
    }
    .msland-checkout-popup-wrapper .msland-popup-container {
        margin: auto;
        min-height: auto; 
        max-height: 90vh; 
        border-radius: var(--radius-lg);
        border: 2px solid var(--msland-brand, #355872);
        overflow-y: auto;
    }
}

body.dark-mode .msland-checkout-popup-wrapper .msland-popup-container {
    background: var(--color-background-secondary) !important;
    color: #ffffff !important;
}

body.dark-mode .msland-checkout-popup-wrapper .msland-popup-title {
    color: #ffffff !important;
}

body.dark-mode .msland-checkout-popup-wrapper .msland-popup-close {
    color: var(--color-text-secondary) !important;
}

body.dark-mode .msland-checkout-popup-wrapper .msland-summary-items-list {
    border-color: var(--color-border) !important;
}

body.dark-mode .msland-checkout-popup-wrapper .msland-summary-item {
    border-bottom-color: var(--color-border) !important;
}

body.dark-mode .msland-checkout-popup-wrapper .msland-item-title {
    color: #ffffff !important;
}

body.dark-mode .msland-checkout-popup-wrapper .msland-item-price {
    color: #ffffff !important;
}

body.dark-mode .msland-checkout-popup-wrapper .msland-remove-summary-item {
    background: var(--color-background-tertiary) !important;
    color: var(--color-text-tertiary) !important;
}

body.dark-mode .msland-checkout-popup-wrapper .msland-remove-summary-item:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

body.dark-mode .msland-checkout-popup-wrapper .msland-item-qty-badge {
    background: #ffffff !important;
    color: #151111 !important;
    border-color: var(--color-background-secondary) !important;
}
