/* NLP Course Buttons Base Styles */
.nlp-course-button .btn {
    transition: all 0.3s ease;
}

/* Disabled button states - keep !important for functional requirements */
.nlp-course-button .btn.disabled:not(.waitlist),
.nlp-course-button .btn:disabled:not(.waitlist) {
    background-color: #e0e0e0;
    color: #666666;
    cursor: not-allowed !important;
    opacity: 0.8;
    border-color: #cccccc;
    pointer-events: none !important;
}

.nlp-course-button .btn:not(:disabled):hover {
    opacity: 0.9;
}

/* Adding state - keep !important for functional requirements */
.nlp-course-button .btn.adding {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.8 !important;
    pointer-events: none !important;
}

/* Spinner animations - keep !important to ensure they work */
.nlp-course-button .btn .spinner,
.item-remove .spinner {
    display: inline-block !important;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.item-remove .spinner {
    width: 12px;
    height: 12px;
    margin-right: 6px;
}

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

/* Shopping Cart Icon */
.shopping-cart-icon {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.shopping-cart-icon:hover {
    opacity: 0.8;
}

/* Ensure shopping cart SVG maintains its explicit dimensions */
.shopping-cart-icon svg {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
}

/* Shopping Cart Modal Structure */
#shoppingCartModal .modal-dialog {
    position: relative;
    max-width: 600px;
}

#shoppingCartModal .modal-content {
    position: relative;
    padding: 20px 30px;
    border-radius: 20px;
}

/* Custom Modal Close Button - high specificity needed to override Bootstrap */
#shoppingCartModal .custom-modal-close.btn-close {
    position: absolute;
    top: -32px;
    right: -18px;
    z-index: 1056;
    background: #f8f9fa;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    padding: 0;
    border: 2px solid #fff;
    opacity: 1;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: none;
}

#shoppingCartModal .custom-modal-close.btn-close::before {
    content: "×";
    color: #6c757d;
    font-size: 40px;
    font-weight: bold;
    line-height: 1;
    display: block;
}

#shoppingCartModal .custom-modal-close.btn-close:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    background: #e9ecef;
    transform: scale(1.05);
    opacity: 1;
}

#shoppingCartModal .custom-modal-close.btn-close:hover::before {
    color: #495057;
}

/* Modal Layout */
#shoppingCartModal .modal-header {
    padding: 20px 10px 15px 10px;
    margin-bottom: 15px;
}

#shoppingCartModal .modal-body {
    padding: 20px 10px;
}

#shoppingCartModal .modal-footer {
    padding: 20px 10px 0 10px;
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

/* Modal Footer Buttons */
#shoppingCartModal .modal-footer .btn,
#shoppingCartModal .modal-footer .continue-browsing-btn,
#shoppingCartModal .modal-footer .enroll-now-btn {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 50px;
    padding: 0 20px;
    margin: 0;
    border-width: 1px;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1;
    box-sizing: border-box;
}

#shoppingCartModal .modal-footer .continue-browsing-btn.w-100 {
    flex: 1;
}

/* Cart Items Styling */
#shoppingCartModal .cart-item {
    padding: 15px 0;
    margin-bottom: 15px;
}

#shoppingCartModal .cart-total {
    text-align: right;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ccc;
}

#shoppingCartModal .items {
    list-style: none;
    padding: 0;
    margin: 0;
}

#shoppingCartModal .item {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
    outline: none;
}

#shoppingCartModal .item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

#shoppingCartModal .item-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

#shoppingCartModal .item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#shoppingCartModal .item-title {
    margin: 0;
    line-height: 1.4;
}

#shoppingCartModal .item-remove {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

#shoppingCartModal .item-remove:hover {
    border-radius: 4px;
}

/* Removing state - keep !important for functional requirements */
#shoppingCartModal .item-remove.removing {
    background: #6c757d !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.8 !important;
    pointer-events: none !important;
}

/* Force hide enroll now button when cart is empty - functional requirement */
#shoppingCartModal .enroll-now-btn[style*="display: none"] {
    display: none !important;
}

/* Button with seats remaining styling */
.nlp-course-button .btn.has-seats-text {
    white-space: normal;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 150px;
    width: auto;
    min-height: 45px;
    padding: 8px 12px;
}

.nlp-course-button .btn .main-button-text {
    display: block;
    font-weight: 500;
}

.nlp-course-button .btn .seats-text {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: normal;
    line-height: 1.1;
}

/* Closed course button styling - default styling when no custom class is defined */
.nlp-course-button .closed:not(.btn) {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.nlp-course-button .closed:not(.btn):hover {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

/* Universal closed button behavior - functional requirement */
.nlp-course-button .closed {
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    pointer-events: none !important;
}

/* Waitlist button styling - default styling when no custom class is defined */
.nlp-course-button .waitlist:not(.btn) {
    background-color: #e0e0e0;
    color: #666666;
    border: 1px solid #cccccc;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1.5;
}

.nlp-course-button .waitlist:not(.btn):hover {
    background-color: #d4d4d4;
    color: #555555;
    border-color: #bbb;
    text-decoration: none;
}

/* Ensure waitlist buttons remain clickable - functional requirement */
.nlp-course-button .btn.waitlist {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Continue browsing button styling - default styling when no custom class is defined */
.continue-browsing-btn:not(.btn) {
    background-color: #e0e0e0;
    color: #666666;
    border: 1px solid #cccccc;
    padding: 0 20px;
    border-radius: 4px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    height: 50px;
    flex: 1;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.3s ease;
    cursor: pointer;
}

.continue-browsing-btn:not(.btn):hover {
    background-color: #d4d4d4;
    color: #555555;
    border-color: #bbb;
    text-decoration: none;
}

/* Enroll now button styling - default styling when no custom class is defined */
.enroll-now-btn:not(.btn) {
    background-color: #e0e0e0;
    color: #666666;
    border: 1px solid #cccccc;
    padding: 0 20px;
    border-radius: 4px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    height: 50px;
    flex: 1;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.3s ease;
    cursor: pointer;
}

.enroll-now-btn:not(.btn):hover {
    background-color: #d4d4d4;
    color: #555555;
    border-color: #bbb;
    text-decoration: none;
}

/* Accessibility - Screen reader only text */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Shopping Cart Badge Styles */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545; /* Red color */
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    z-index: 10;
    min-width: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Double digit numbers (10-99) */
.cart-badge.cart-badge-double-digit {
    width: 24px;
    height: 20px;
    border-radius: 10px;
    font-size: 11px;
}

/* Large numbers (99+) */
.cart-badge.cart-badge-large {
    width: 28px;
    height: 20px;
    border-radius: 10px;
    font-size: 10px;
    padding: 0 4px;
}