/* 
 * Styles für die Warenkorb-Seite
 * Erweiterung der bestehenden cart.css
 */

 /* Allgemein */

.alert {
    padding: 5px 10px;
}

.alert-danger {
    background: #ffc4c4;
    color: #5e0000;
}

.alert-info {
    background: #d4e9ff;
    color: #004272;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* Warenkorb-Seite Layout */
.cart-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.cart-page-header {
    margin-bottom: 2rem;
}

.cart-page-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.cart-page-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

/* Warenkorb-Items */
.cart-page-items {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.cart-page-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
}

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

.cart-page-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cart-page-item-info {
    flex-grow: 1;
}

.cart-page-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
}

.cart-page-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #4a5568;
    font-size: 0.875rem;
}

.cart-page-item-price {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.125rem;
    white-space: nowrap;
}

.cart-page-item-participants {
    margin: 1rem 0;
}

.cart-page-item-participants h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #4a5568;
}

.cart-page-participants-list {
    background-color: #f7fafc;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.participant-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.participant-list-item:last-child {
    border-bottom: none;
}

.participant-list-info {
    flex-grow: 1;
}

.participant-list-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.participant-list-email {
    font-size: 0.875rem;
    color: #718096;
}

.participant-list-status {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
    text-transform: capitalize;
}

.participant-list-status.pending {
    background-color: #feebc8;
    color: #c05621;
}

.participant-list-status.confirmed {
    background-color: #c6f6d5;
    color: #2f855a;
}

.participant-list-status.cancelled {
    background-color: #fed7d7;
    color: #c53030;
}

.participant-list-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-participant-btn,
.remove-participant-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #718096;
    transition: color 0.2s;
}

.edit-participant-btn:hover {
    color: #4299e1;
}

.remove-participant-btn:hover {
    color: #e53e3e;
}

.no-participants {
    padding: 1rem;
    text-align: center;
    color: #718096;
    font-style: italic;
}

.add-participant-btn {
    background-color: #ebf8ff;
    color: #3182ce;
    border: none;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-participant-btn:hover {
    background-color: #bee3f8;
}

.cart-page-item-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.remove-item-btn {
    background-color: transparent;
    color: #e53e3e;
    border: 1px solid #e53e3e;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.edit-item-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.remove-item-btn:hover {
    background-color: #e53e3e;
    color: white;
}

/* Warenkorb-Zusammenfassung */
.cart-page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-page-summary {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 1rem 0;
}

.summary-items {
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #4a5568;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: #2d3748;
}

.summary-total-net {
    padding: 1rem 0;
    border-top: 2px solid #e2e8f0;
}

.summary-total-net,
.summary-total-vat {
    display: flex;
    justify-content: space-between;

    font-weight: 400;

    color: #2d3748;
}

.summary-total-vat {
    margin-bottom: 1.5rem;
}

.cart-page-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-page-continue-btn,
.cart-page-checkout-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: center;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s;
    text-decoration: none;
}

.cart-page-continue-btn {
    background-color: #e2e8f0;
    color: #2d3748;
}

.cart-page-continue-btn:hover {
    background-color: #cbd5e0;
}

.cart-page-checkout-btn {
    background-color: #4299e1;
    color: white;
    border: none;
    cursor: pointer;
}

.cart-page-checkout-btn:hover {
    background-color: #3182ce;
}

.cart-page-checkout-btn:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
}

.cart-login-notice {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.875rem;
    color: #4a5568;
}

.cart-login-notice p {
    margin-bottom: 0.75rem;
}

.cart-login-btn {
    display: inline-block;
    background-color: #ebf8ff;
    color: #3182ce;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.cart-login-btn:hover {
    background-color: #bee3f8;
}

.cart-help {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.cart-help h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #2d3748;
}

.cart-help p {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 1rem;
}

.cart-contact-btn {
    display: inline-block;
    background-color: #ebf8ff;
    color: #3182ce;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.cart-contact-btn:hover {
    background-color: #bee3f8;
}

/* Ladeanimation */
.cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #718096;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(66, 153, 225, 0.3);
    border-radius: 50%;
    border-top-color: #4299e1;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

/* Leerer Warenkorb */
.empty-cart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.empty-cart-icon {
    color: #a0aec0;
    margin-bottom: 1.5rem;
}

.empty-cart-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.75rem 0;
}

.empty-cart-container p {
    color: #718096;
    margin-bottom: 1.5rem;
    max-width: 24rem;
}

.browse-courses-btn {
    display: inline-block;
    background-color: #4299e1;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.browse-courses-btn:hover {
    background-color: #3182ce;
}

.text-danger {
    color: var(--color-danger)!important;
}

.text-underline {
    text-decoration: underline!important;
}
/* Responsive Design */
@media (max-width: 900px) {
    .cart-page-content {
        grid-template-columns: 1fr;
    }

    .cart-page-sidebar {
        order: -1;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 640px) {
    .cart-page-item-header {
        flex-direction: column;
    }

    .cart-page-item-price {
        margin-top: 0.5rem;
    }

    .cart-page-item-participants h4 {
        margin-top: 1rem;
    }
}