/* Shopping Cart Styles */

/* Cart Icon */
.ldsc-cart-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 8px 12px;
}

.ldsc-cart-icon {
    font-size: 24px;
    position: relative;
    color: #6EC1E4; /* Brand Color */
}

.ldsc-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    top: -8px;
    right: -8px;
    background: #6EC1E4; /* Brand Color */
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ldsc-cart-badge:empty {
    display: none;
}

/* Cart Button */
.ldsc-cart-add-button {
    background-color: #059669 !important; /* Green like Buy Button */
    background: #059669 !important;
    width: 100% !important; /* Full Width */
    display: block !important;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.ldsc-cart-add-button:hover {
    background-color: #047857 !important;
    background: #047857 !important;
}

.ldsc-cart-add-button:disabled {
    background-color: #9ca3af !important;
    background: #9ca3af !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Cart Page Layout */
.ldsc-cart-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ldsc-cart-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
}

.ldsc-cart-count {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 24px;
}

/* Auto Discount Banner */
.ldsc-auto-discount-banner {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ldsc-auto-discount-banner .ldsc-checkmark {
    background: #10b981;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.ldsc-auto-discount-banner strong {
    display: block;
    color: #065f46;
    font-size: 16px;
    margin-bottom: 4px;
}

.ldsc-auto-discount-banner p {
    color: #047857;
    font-size: 14px;
    margin: 0;
}

/* Cart Layout */
.ldsc-cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 1024px) {
    .ldsc-cart-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ldsc-cart-item {
        padding: 16px 0;
    }

    .ldsc-cart-item-image {
        width: 60px;
        height: 60px;
    }

    .ldsc-cart-item-price {
        font-size: 16px;
        margin-right: 8px;
    }

    .ldsc-cart-title {
        font-size: 24px;
    }
}

/* Cart Items */
.ldsc-cart-items {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ldsc-cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.ldsc-cart-empty p {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 24px;
}

/* Cart Item */
.ldsc-cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.ldsc-cart-item:last-child {
    border-bottom: none;
}

.ldsc-cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.ldsc-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ldsc-cart-item-image-placeholder {
    font-size: 32px;
}

.ldsc-cart-item-info {
    flex: 1;
}

.ldsc-cart-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.ldsc-cart-item-meta {
    font-size: 14px;
    color: #6b7280;
}

.ldsc-cart-item-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.ldsc-cart-item-badge.bundle {
    background: #e0e7ff;
    color: #3730a3;
}

.ldsc-cart-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-right: 16px;
}

.ldsc-cart-item-remove {
    background: transparent !important;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.ldsc-cart-item-remove:hover {
    background: #eff6ff !important;
    color: #3b82f6;
}

/* Coupon Section */
.ldsc-coupon-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.ldsc-coupon-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.ldsc-coupon-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.ldsc-coupon-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.ldsc-coupon-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ldsc-coupon-apply-btn {
    background: #1f2937;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.ldsc-coupon-apply-btn:hover {
    background: #111827;
}

.ldsc-coupon-hint {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* Coupon Applied */
.ldsc-coupon-applied {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ldsc-coupon-applied strong {
    display: block;
    color: #065f46;
    font-size: 14px;
    margin-bottom: 4px;
}

.ldsc-coupon-applied p {
    color: #047857;
    font-size: 13px;
    margin: 0;
}

.ldsc-coupon-remove {
    background: none;
    border: none;
    color: #047857;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ldsc-coupon-remove:hover {
    background: rgba(16, 185, 129, 0.1);
}

/* Order Summary */
.ldsc-cart-sidebar {
    position: sticky;
    top: 20px;
}

.ldsc-order-summary {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ldsc-order-summary h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
}

.ldsc-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    color: #374151;
}

.ldsc-summary-line:first-of-type {
    font-weight: 600;
}

.ldsc-auto-discount-line,
.ldsc-coupon-discount-line {
    color: #10b981;
}

.ldsc-coupon-badge {
    background: #d1fae5;
    color: #047857;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

.ldsc-summary-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}

.ldsc-tax-note {
    background: #f3f4f6;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    text-align: center;
}

.ldsc-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #dbeafe;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ldsc-summary-total span:first-child {
    font-size: 16px;
    font-weight: 600;
    color: #1e3a8a;
}

.ldsc-summary-total .ldsc-total {
    font-size: 24px;
    font-weight: 700;
    color: #1e40af;
}

.ldsc-checkout-btn {
    width: 100%;
    background: #10b981;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 12px;
}

.ldsc-checkout-btn:hover {
    background: #059669;
}

.ldsc-checkout-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.ldsc-checkout-btn:focus,
.ldsc-checkout-btn:active,
.ldsc-checkout-btn:focus:active,
.ldsc-checkout-btn:visited,
button.ldsc-checkout-btn:focus,
button.ldsc-checkout-btn:active,
.ldsc-order-summary .ldsc-checkout-btn:focus,
.ldsc-order-summary .ldsc-checkout-btn:active {
    background: #10b981 !important;
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: white !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3) !important;
}

.ldsc-continue-shopping-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.ldsc-continue-shopping-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.ldsc-continue-shopping {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.ldsc-continue-shopping:hover {
    background: #2563eb;
}

.ldsc-stripe-badge {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin-top: 16px;
    margin-bottom: 0;
}

/* Enrolled Notice */
.ldsc-enrolled-notice {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
}

/* Loading State */
.ldsc-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error Messages */
.ldsc-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* SweetAlert2 Overrides */
div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm {
    background-color: #3b82f6 !important;
    background-image: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: white !important;
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel {
    background-color: #9ca3af !important;
    background-image: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: white !important;
}

div:where(.swal2-container) button:where(.swal2-styled) {
    border-radius: 6px !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}


/* Loading Spinner */
.ldsc-cart-loader {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ldsc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #6EC1E4; /* Brand Color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}