/**
 * Axiom On-Demand Order Cart Page Styles
 * Modern UI/UX with Primary (#F49320) and Secondary (#6B7C8D) color scheme
 */

.aod-order-cart-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #F9FAFB;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.aod-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0;
}

.aod-cart-title {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin: 0;
    letter-spacing: -0.5px;
}

.aod-cart-view-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aod-view-select {
    padding: 8px 12px 8px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #4B5563;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7C8D' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px;
    transition: all 0.2s;
}

.aod-view-select:hover {
    border-color: var(--aod-primary, #F49320);
    background-color: #FFF5EB;
}

.aod-view-select:focus {
    outline: none;
    border-color: var(--aod-primary, #F49320);
    box-shadow: 0 0 0 3px rgba(244, 147, 32, 0.1);
}

/* Menu Icon (3 horizontal lines) */
.aod-menu-icon {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s;
}

.aod-menu-icon:hover {
    background: #FFF5EB;
    border-color: var(--aod-primary, #F49320);
}

.aod-menu-icon span {
    display: block;
    width: 18px;
    height: 2px;
    background: #6B7C8D;
    border-radius: 1px;
    transition: all 0.2s;
}

.aod-menu-icon:hover span {
    background: var(--aod-primary, #F49320);
}

/* Main Cart Card */
.aod-cart-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    border: 1px solid #E5E7EB;
}

/* Cart Table */
.aod-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.aod-cart-table thead {
    border-bottom: 3px solid var(--aod-primary, #F49320);
    background: #FFF5EB;
}

.aod-cart-table th {
    text-align: left;
    padding: 16px 12px;
    font-weight: 600;
    font-size: 14px;
    color: #1F2937;
    text-transform: none;
    letter-spacing: 0;
    background: transparent;
}

.aod-cart-table td {
    padding: 20px 12px;
    border-bottom: 2px solid #F3F4F6;
    vertical-align: middle;
}

.aod-cart-table tbody tr:last-child td {
    border-bottom: none;
}

.aod-cart-table tbody tr:hover {
    background: #FFF5EB;
}

/* Item Column */
.aod-col-item {
    width: 28%;
}

.aod-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aod-item-icon {
    flex-shrink: 0;
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: all 0.2s;
}

.aod-item-icon:hover {
    border-color: var(--aod-primary, #F49320);
    box-shadow: 0 2px 8px rgba(244, 147, 32, 0.2);
}

.aod-item-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aod-item-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.aod-item-thumbnail-placeholder::before {
    content: '📄';
    font-size: 20px;
    opacity: 0.5;
}

.aod-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    word-break: break-word;
    line-height: 1.4;
}

/* Hold/Ship Column */
.aod-col-hold-ship {
    width: 15%;
}

.aod-hold-ship-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    background: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%236B7C8D' d='M4 6L0 2h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 8px;
    padding-right: 30px;
    height: 38px;
    box-sizing: border-box;
}

.aod-hold-ship-select:hover {
    border-color: var(--aod-primary, #F49320);
    background-color: #FFF5EB;
}

.aod-hold-ship-select:focus {
    outline: none;
    border-color: var(--aod-primary, #F49320);
    box-shadow: 0 0 0 3px rgba(244, 147, 32, 0.1);
}

/* Due Date Request Column */
.aod-col-date {
    width: 18%;
}

.aod-date-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    background: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
    transition: all 0.2s;
    font-family: inherit;
    height: 38px;
    box-sizing: border-box;
}

.aod-date-input:hover {
    border-color: var(--aod-primary, #F49320);
    background-color: #FFF5EB;
}

.aod-date-input:focus {
    outline: none;
    border-color: var(--aod-primary, #F49320);
    box-shadow: 0 0 0 3px rgba(244, 147, 32, 0.1);
}

/* Quantity Column */
.aod-col-quantity {
    width: 15%;
}

.aod-quantity-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    background: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
    text-align: left;
    transition: all 0.2s;
    font-family: inherit;
    height: 38px;
    box-sizing: border-box;
}

.aod-quantity-input:hover {
    border-color: var(--aod-primary, #F49320);
    background-color: #FFF5EB;
}

.aod-quantity-input:focus {
    outline: none;
    border-color: var(--aod-primary, #F49320);
    box-shadow: 0 0 0 3px rgba(244, 147, 32, 0.1);
}

/* Total Column */
.aod-col-total {
    width: 15%;
    text-align: right;
}

.aod-item-total {
    font-size: 16px;
    font-weight: 700;
    color: #6B7C8D;
}

/* Cart Footer */
.aod-cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 25px 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
}

.aod-footer-left {
    flex: 1;
}

.aod-footer-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

/* Update Cart Button Wrapper */
.aod-cart-update-wrapper {
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
    border-top: 2px solid #E5E7EB;
}

#aod-update-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--aod-primary, #F49320);
    color: #FFFFFF;
    border: 2px solid var(--aod-primary, #F49320);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
    height: 46px;
    box-sizing: border-box;
    line-height: 22px;
    box-shadow: 0 4px 15px rgba(244, 147, 32, 0.3);
}

#aod-update-cart-btn:hover {
    background: var(--aod-primary-dark, #D67A0A);
    border-color: var(--aod-primary-dark, #D67A0A);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 147, 32, 0.4);
}

#aod-update-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(244, 147, 32, 0.3);
}

/* PO Number Input Field */
.aod-po-field-wrapper {
    width: 100%;
    max-width: 231px;
}

.aod-po-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s;
    height: 46px;
}

.aod-po-input::placeholder {
    color: #9CA3AF;
}

.aod-po-input:hover {
    border-color: var(--aod-primary, #F49320);
    background-color: #FFF5EB;
}

.aod-po-input:focus {
    outline: none;
    border-color: var(--aod-primary, #F49320);
    box-shadow: 0 0 0 3px rgba(244, 147, 32, 0.1);
    background: #fff;
}

/* Final Total */
.aod-final-total {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aod-final-total label {
    font-size: 16px;
    font-weight: 600;
    color: #6B7C8D;
    margin: 0;
    white-space: nowrap;
}

.aod-final-total-input {
    font-size: 20px;
    font-weight: 700;
    color: #1F2937;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    background: #fff;
    min-width: 231px;
    width: 231px;
    height: 46px;
    text-align: right;
    font-family: inherit;
    box-sizing: border-box;
}

.aod-final-total-input:focus {
    outline: none;
    border-color: var(--aod-primary, #F49320);
    box-shadow: 0 0 0 3px rgba(244, 147, 32, 0.1);
}

/* Finalize Order Button */
.aod-finalize-action {
    flex-shrink: 0;
}

.aod-finalize-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--aod-primary, #F49320);
    color: #FFFFFF;
    border: 2px solid var(--aod-primary, #F49320);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
    height: 46px;
    box-sizing: border-box;
    line-height: 22px;
    box-shadow: 0 4px 15px rgba(244, 147, 32, 0.3);
}

.aod-finalize-order-btn:hover {
    background: var(--aod-primary-dark, #D67A0A);
    border-color: var(--aod-primary-dark, #D67A0A);
    color: #FFFFFF;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 147, 32, 0.4);
}

.aod-finalize-order-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(244, 147, 32, 0.3);
}

/* Empty Cart */
.aod-cart-empty {
    background: #fff;
    border-radius: 12px;
    padding: 80px 30px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

.aod-cart-empty p {
    font-size: 18px;
    color: #666;
    margin-bottom: 25px;
}

.aod-cart-empty .button {
    padding: 12px 24px;
    background: var(--aod-primary, #F49320);
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(244, 147, 32, 0.3);
}

.aod-cart-empty .button:hover {
    background: var(--aod-primary-dark, #D67A0A);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 147, 32, 0.4);
    color: #fff;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .aod-order-cart-page {
        padding: 20px 15px;
    }
    
    .aod-cart-card {
        padding: 20px;
    }
    
    .aod-cart-table {
        font-size: 13px;
    }
    
    .aod-cart-table th,
    .aod-cart-table td {
        padding: 15px 8px;
    }
    
    .aod-item-icon {
        width: 60px;
        height: 60px;
    }
    
    .aod-item-name {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .aod-order-cart-page {
        padding: 15px 10px;
    }
    
    .aod-cart-header {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .aod-cart-title {
        font-size: 24px;
    }
    
    .aod-cart-card {
        padding: 15px;
        border-radius: 8px;
    }
    
    /* Make table scrollable on mobile */
    .aod-cart-card {
        overflow-x: auto;
    }
    
    .aod-cart-table {
        min-width: 700px;
        font-size: 12px;
    }
    
    .aod-cart-table th,
    .aod-cart-table td {
        padding: 12px 6px;
    }
    
    .aod-col-item {
        width: 30%;
        min-width: 150px;
    }
    
    .aod-col-hold-ship,
    .aod-col-date,
    .aod-col-quantity,
    .aod-col-total {
        width: auto;
        min-width: 100px;
    }
    
    .aod-item-icon {
        width: 50px;
        height: 50px;
    }
    
    .aod-item-name {
        font-size: 12px;
    }
    
    .aod-hold-ship-select,
    .aod-date-input,
    .aod-quantity-input {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .aod-item-total {
        font-size: 14px;
    }
    
    .aod-cart-footer {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        padding: 20px;
    }
    
    .aod-footer-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .aod-po-field-wrapper {
        max-width: 100%;
        width: 100%;
    }
    
    .aod-po-input {
        width: 100%;
        max-width: 100%;
    }
    
    .aod-final-total {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .aod-final-total label {
        font-size: 14px;
    }
    
    .aod-final-total-input {
        width: 100%;
        max-width: 100%;
        font-size: 18px;
        min-width: auto;
    }
    
    .aod-finalize-order-btn {
        width: 100%;
        text-align: center;
        padding: 14px 24px;
        height: auto;
        min-height: 46px;
    }
}

@media (max-width: 480px) {
    .aod-order-cart-page {
        padding: 10px 5px;
    }
    
    .aod-cart-title {
        font-size: 20px;
    }
    
    .aod-cart-card {
        padding: 12px;
    }
    
    .aod-cart-table {
        min-width: 650px;
        font-size: 11px;
    }
    
    .aod-cart-table th {
        font-size: 10px;
        padding: 10px 4px;
    }
    
    .aod-cart-table td {
        padding: 10px 4px;
    }
    
    .aod-item-icon {
        width: 45px;
        height: 45px;
    }
    
    .aod-item-name {
        font-size: 11px;
    }
    
    .aod-hold-ship-select,
    .aod-date-input,
    .aod-quantity-input {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .aod-item-total {
        font-size: 13px;
    }
    
    .aod-cart-footer {
        padding: 15px;
    }
    
    .aod-final-total label {
        font-size: 14px;
    }
    
    .aod-final-total-input {
        font-size: 18px;
        padding: 10px 15px;
    }
    
    .aod-finalize-order-btn {
        font-size: 14px;
        padding: 14px 20px;
    }
}

/* Print Styles */
@media print {
    .aod-cart-header,
    .aod-cart-view-toggle,
    .aod-enter-po-btn,
    .aod-finalize-order-btn {
        display: none;
    }
    
    .aod-order-cart-page {
        background: #fff;
        padding: 0;
    }
    
    .aod-cart-card,
    .aod-cart-footer {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
