/* Scoped styles for Shopping Cart Page */
.shopping-cart-wrapper {
    background-color: #f8f9fa; /* Light gray background for contrast */
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #374151;
}

.shopping-cart-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Card Styles */
.cart-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.cart-header-section {
    background: #fff;
    padding: 2rem;
    border-bottom: 1px solid #f3f4f6;
}

.cart-company-title {
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #111827;
    margin-bottom: 0.5rem;
}

.cart-meta-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.925rem;
    color: #4b5563;
    margin-bottom: 0.25rem;
}

.cart-meta-label {
    font-weight: 600;
    color: #1f2937;
    min-width: 80px;
}

/* Customer Card */
.customer-badge {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
}

.customer-name {
    color: #1e40af; /* Deep blue highlight */
    font-weight: 700;
}

/* Cart Items */
.cart-item-row {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

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

.cart-item-row:hover {
    background-color: #fafbfc;
}

.cart-item-image-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
    padding: 4px;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-details {
    flex-grow: 1;
    padding: 0 1.5rem;
}

.cart-item-price-block {
    text-align: right;
    min-width: 140px;
}

.quantity-control {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 9999px;
    padding: 2px;
    width: fit-content;
    margin-top: 0.5rem;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #fff;
    color: #2563eb;
    transform: scale(1.1);
}

.quantity-display {
    padding: 0 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
}

/* Agent Selector Redesign */
.agent-select-wrapper {
    background: #fff;
    border-radius: 12px;
}

.modern-agent-selector {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-agent-selector:hover {
    border-color: #bfdbfe;
    box-shadow: 0 0 0 4px #eff6ff;
}

/* Summary Card */
.summary-card {
    background: #111827; /* Dark theme for summary to stand out */
    color: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
}

.summary-row.total {
    border-bottom: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.btn-checkout {
    background: #2563eb;
    color: white;
    font-weight: 600;
    padding: 1rem;
    border-radius: 10px;
    border: none;
    width: 100%;
    margin-top: 1.5rem;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-checkout:not(:disabled):hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-checkout.disabled, .btn-checkout:disabled {
    background: #4b5563;
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-text-action {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.75rem;
    border-radius: 8px;
    width: 100%;
    margin-top: 0.75rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-text-action:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Print Specifics */
@media print {
    .shopping-cart-wrapper {
        background: white;
    }
    .cart-card {
        box-shadow: none;
        border: none;
    }
    .no-print {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cart-item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .cart-item-details {
        padding: 0;
        width: 100%;
    }
    .cart-item-price-block {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
    }
    .cart-header-section {
        flex-direction: column;
    }
}

/* Agent Selector Internals (Required for JS) */
.agent-selector {
    position: relative;
}

.selected-agent {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #fff;
    cursor: pointer;
    gap: 12px;
}

.agent-image {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f3f4f6;
}

.agent-info {
    flex: 1;
    overflow: hidden;
}

.agent-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-email {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    color: #9ca3af;
    transition: transform 0.2s;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

.agents-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    opacity: 0;
    z-index: 50;
}

.agents-list.open {
    max-height: 280px;
    opacity: 1;
    overflow-y: auto;
}

.agent-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.15s;
    border-bottom: 1px solid #f9fafb;
    gap: 12px;
}

.agent-option:last-child {
    border-bottom: none;
}

.agent-option:hover {
    background-color: #f3f4f6;
}

.agent-option.selected {
    background-color: #eff6ff;
}

.selected-indicator {
    color: #2563eb;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s;
}

.agent-option.selected .selected-indicator {
    opacity: 1;
}

.no-agents {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}