/**
 * Cart Page Styles
 * Extracted from components/cart.html
 * Phase 2C - CSS Refactor
 */

/* ===== BASE ===== */
body {
    padding-top: 80px;
    min-height: 100vh;
    background: linear-gradient(135deg, #FFF5F0 0%, #FFEEE6 50%, #FFE0D2 100%);
    overflow-x: hidden;
}

/* ===== LAYOUT ===== */
.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.cart-header {
    text-align: center;
    margin-bottom: 40px;
}

.cart-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #E8704E, #CC5836);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.cart-header p {
    color: #6B5E57;
    font-size: 1.1rem;
    font-weight: 600;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* ===== RESERVATION TIMER ===== */
.reservation-timer {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: timerPulse 2s infinite;
    grid-column: 1 / -1;
}

.reservation-timer.urgent {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #ef4444;
    animation: timerPulse 1s infinite;
    animation-name: timerPulseUrgent;
}

@keyframes timerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

@keyframes timerPulseUrgent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.timer-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    flex-shrink: 0;
}

.reservation-timer.urgent .timer-icon {
    color: #ef4444;
}

.timer-content {
    flex: 1;
}

.timer-title {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 2px;
}

.reservation-timer.urgent .timer-title {
    color: #991b1b;
}

.timer-countdown {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: #f59e0b;
}

.reservation-timer.urgent .timer-countdown {
    color: #ef4444;
}

.timer-extend {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.timer-extend:hover {
    background: #d97706;
    transform: scale(1.05);
}

.reservation-timer.urgent .timer-extend {
    background: #ef4444;
}

.reservation-timer.urgent .timer-extend:hover {
    background: #dc2626;
}

/* ===== PET CARDS LIST ===== */
.cart-pets {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-pet-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    align-items: center;
    border: 3px solid #FFEEE6;
    box-shadow: 0 4px 15px rgba(232, 112, 78, 0.1);
    transition: all 0.3s ease;
}

.cart-pet-card:hover {
    border-color: #E8704E;
    box-shadow: 0 8px 25px rgba(232, 112, 78, 0.2);
}

.cart-pet-image {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    object-fit: cover;
    background: linear-gradient(135deg, #FFF5F0, #FFEEE6);
}

.cart-pet-image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    background: linear-gradient(135deg, #FFF5F0, #FFEEE6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E8704E;
}

.cart-pet-info {
    flex: 1;
}

.cart-pet-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #E8704E;
    margin-bottom: 5px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-pet-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.cart-pet-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #6B5E57;
    font-weight: 600;
}

.cart-pet-detail i {
    color: #E8704E;
}

.cart-pet-occasion {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #FFEEE6, #FFE0D2);
    color: #2A6B6B;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.cart-pet-occasion.memorial {
    background: linear-gradient(135deg, #FFF5F0, #FFEEE6);
    color: #CC5836;
}

.cart-pet-pricing {
    text-align: right;
    min-width: 120px;
}

.cart-pet-price {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1A1514;
}

.cart-pet-squares {
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
}

.cart-pet-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    margin-top: 8px;
}

.cart-pet-remove {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-pet-remove:hover {
    background: #fee2e2;
}

.cart-pet-edit {
    background: none;
    border: none;
    color: #358585;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-pet-edit:hover {
    background: #FFEEE6;
}

/* ===== ADD ANOTHER CARD ===== */
.add-another-card {
    background: white;
    border: 3px dashed #FFE0D2;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-another-card:hover {
    border-color: #E8704E;
    background: #FFF5F0;
}

.add-another-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.add-another-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FFF5F0, #FFEEE6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #E8704E;
}

.add-another-card h3 {
    font-family: 'Poppins', sans-serif;
    color: #E8704E;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.add-another-card p {
    color: #6B5E57;
    font-size: 0.9rem;
}

.add-another-discount {
    display: block;
    background: linear-gradient(135deg, #FFEEE6, #FFE0D2);
    color: #2A6B6B;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 12px 0 8px;
}

.cart-limit-badge {
    display: inline-block;
    background: #FFEEE6;
    color: #E8704E;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 10px;
}

/* ===== PRICING SUMMARY SIDEBAR ===== */
.cart-summary {
    background: white;
    border-radius: 25px;
    padding: 30px;
    border: 4px solid #E8704E;
    box-shadow: 0 10px 40px rgba(232, 112, 78, 0.2);
    position: sticky;
    top: 100px;
}

.cart-summary h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #E8704E;
    margin-bottom: 25px;
    text-align: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 2px solid #FFEEE6;
    font-weight: 600;
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-label {
    color: #6B5E57;
}

.summary-value {
    color: #1A1514;
    font-weight: 700;
}

.summary-discount {
    background: linear-gradient(135deg, #FFEEE6, #FFE0D2);
    margin: 15px -15px;
    padding: 15px;
    border-radius: 12px;
}

.summary-discount .summary-label {
    color: #2A6B6B;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-discount .summary-value {
    color: #2A6B6B;
    font-weight: 800;
}

.discount-badge {
    background: #358585;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.summary-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 3px solid #E8704E;
}

.summary-total .summary-label {
    font-size: 1.1rem;
    color: #1A1514;
}

.summary-total .summary-value {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    color: #E8704E;
    font-weight: 800;
}

/* ===== CHARITY HIGHLIGHT ===== */
.charity-highlight {
    background: linear-gradient(135deg, #FFEEE6, #FFE0D2);
    border: 2px solid #358585;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin: 25px 0;
}

.charity-highlight-icon {
    color: #358585;
    margin-bottom: 8px;
}

.charity-amount {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #2A6B6B;
}

.charity-label {
    font-size: 0.9rem;
    color: #6B5E57;
    margin-top: 5px;
}

/* ===== CHECKOUT BUTTON ===== */
.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #E8704E, #CC5836);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Quicksand', sans-serif;
    box-shadow: 0 4px 15px rgba(232, 112, 78, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(232, 112, 78, 0.4);
}

.checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===== EMPTY CART STATE ===== */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.empty-cart-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #FFF5F0, #FFEEE6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: #E8704E;
}

.empty-cart h2 {
    font-family: 'Poppins', sans-serif;
    color: #E8704E;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.empty-cart p {
    color: #6B5E57;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.empty-cart .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== HOUSEHOLD INFO ===== */
.household-info {
    background: linear-gradient(135deg, #f3edff, #e9dcff);
    border: 2px solid #a78bfa;
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.household-info-icon {
    color: #8b5cf6;
}

.household-info-text {
    flex: 1;
}

.household-info-text strong {
    color: #8b5cf6;
    display: block;
    margin-bottom: 2px;
}

.household-info-text span {
    font-size: 0.85rem;
    color: #6B5E57;
}

/* ===== LOADING STATE ===== */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
        order: -1;
        padding: 20px;
        border-width: 3px;
        border-radius: 18px;
    }

    .cart-pet-card {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }

    .cart-pet-image,
    .cart-pet-image-placeholder {
        width: 80px;
        height: 80px;
    }

    .cart-pet-pricing {
        grid-column: 1 / -1;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 15px;
        border-top: 2px solid #FFEEE6;
        margin-top: 10px;
    }
}
