/**
 * Axichem Orders Frontend Styles - Matching Forecast Design
 * Direct copy from forecast plugin for visual consistency
 */

/* ===================================
   SMOOTH TRANSITIONS & ANIMATIONS
   =================================== */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Container */
.orders-container,
.orders_body,
.axichem-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.orders-container h2 {
    margin-top: 0;
    color: #23282d;
}

/* Orders Header */
.orders-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
}

.orders-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #23282d;
}

.orders-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Orders Table */
#axichem-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#axichem-orders-table th,
#axichem-orders-table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #ddd;
    min-width: 80px;
    white-space: normal;
    word-wrap: break-word;
}

#axichem-orders-table th {
    background: #0073aa;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

#axichem-orders-table th:first-child,
#axichem-orders-table td:first-child {
    text-align: left;
    padding-left: 15px;
}

#axichem-orders-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

/* COMPLETELY REMOVE ALL DATATABLES SORTING ARROWS */
#axichem-orders-table thead th:before,
#axichem-orders-table thead th:after,
#axichem-orders-table tbody td:before,
#axichem-orders-table tbody td:after,
#axichem-orders-table th.sorting:before,
#axichem-orders-table th.sorting:after,
#axichem-orders-table th.sorting_asc:before,
#axichem-orders-table th.sorting_asc:after,
#axichem-orders-table th.sorting_desc:before,
#axichem-orders-table th.sorting_desc:after,
#axichem-orders-table th.sorting_disabled:before,
#axichem-orders-table th.sorting_disabled:after,
table.dataTable thead th:before,
table.dataTable thead th:after,
table.dataTable tbody td:before,
table.dataTable tbody td:after,
table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:before,
table.dataTable thead .sorting_desc_disabled:after,
.dataTables_wrapper table.dataTable thead th:before,
.dataTables_wrapper table.dataTable thead th:after {
    display: none !important;
    content: "" !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.product-name {
    font-weight: 600;
    color: #23282d;
}

.product-sku {
    color: #666;
    font-size: 12px;
}

.row-total {
    font-weight: bold;
    color: #0073aa;
}

.no-data,
.orders-empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.orders-empty-state svg {
    margin-bottom: 20px;
    opacity: 0.7;
}

.orders-empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #444;
    font-weight: 500;
}

.orders-empty-state p {
    font-size: 15px;
    color: #666;
    margin-bottom: 0;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-indicator::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-indicator p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* ===================================
   ADMIN SECTION
   =================================== */

/* User Selection Container */
.user-selection-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e1e1e1;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
}

.user-selection-container label {
    margin-right: 10px;
    font-weight: 600;
    color: #23282d;
}

.user-selection-container select {
    flex-grow: 1;
    max-width: 400px;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px;
    background: #fff;
    color: #23282d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-selection-container select:hover {
    border-color: #0073aa;
}

.user-selection-container select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Button Styling */
.add-order-container {
    margin: 20px 0;
}

#show-add-order-form,
.button {
    padding: 10px 16px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background-color: #0073aa;
    color: white;
    transition: all 0.2s ease;
}

#show-add-order-form:hover,
.button:hover {
    background-color: #005a87;
}

#cancel-add-order {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    margin-left: 10px;
    padding: 10px 16px;
    border-radius: 3px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

#cancel-add-order:hover {
    background-color: #eee;
}

/* Form Styling */
#add-order-form {
    background-color: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

#add-order-form .form-table th {
    width: 150px;
    padding: 15px 10px 15px 0;
    font-weight: 600;
    color: #23282d;
}

#add-order-form h3 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    color: #23282d;
    font-weight: 600;
}

#add-order-form input[type="text"],
#add-order-form input[type="number"] {
    width: 100%;
    max-width: 350px;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* Remove spinner arrows from number inputs */
#add-order-form input[type="number"] {
    -moz-appearance: textfield;
}

#add-order-form input[type="number"]::-webkit-outer-spin-button,
#add-order-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#add-order-form input[type="text"]:focus,
#add-order-form input[type="number"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

#add-order-form .description {
    font-style: italic;
    color: #666;
    margin-top: 5px;
    font-size: 13px;
}

#add-order-form .submit {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

/* Product Suggestions */
#product-suggestions {
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    z-index: 9999;
    margin-top: -1px;
    width: auto;
    min-width: 200px;
    max-width: 350px;
    position: absolute;
    
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#product-suggestions::-webkit-scrollbar {
    display: none;
}

.product-suggestion-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.product-suggestion-item:hover {
    background: #f0f8ff;
}

.product-suggestion-item:last-child {
    border-bottom: none;
}

#product-suggestions-container {
    position: relative;
    width: auto;
    display: inline-block;
}

/* Remove Product Button & Delete Button */
.remove-product-btn,
.button-link-delete {
    background: #dc3232;
    color: #fff !important;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.remove-product-btn:hover,
.button-link-delete:hover {
    background: #b52727;
    color: #fff !important;
}

/* DataTables Customization */
.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    background-color: #fff;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.dataTables_wrapper .dataTables_length select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #23282d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_length select:hover {
    border-color: #0073aa;
}

.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.dataTables_wrapper .dataTables_length {
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_info, 
.dataTables_wrapper .dataTables_paginate {
    margin-top: 15px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 5px 10px;
    margin-left: 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0073aa;
    color: white !important;
    border-color: #0073aa;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #f0f8ff;
    border-color: #0073aa;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1200px) {
    #axichem-orders-table {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .orders-container,
    .orders_body,
    .axichem-form {
        padding: 15px;
        border-radius: 8px;
    }
    
    .orders-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px;
    }
    
    /* Mobile Table Wrapper */
    #axichem-orders-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 11px;
    }
    
    #axichem-orders-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    #axichem-orders-table th:first-child,
    #axichem-orders-table td:first-child {
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 5;
        box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    }
    
    #axichem-orders-table th,
    #axichem-orders-table td {
        padding: 8px 4px;
        white-space: normal;
        min-width: 60px;
    }
    
    .user-selection-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .user-selection-container select {
        width: 100%;
        max-width: 100%;
    }
    
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: left;
        float: none;
        width: 100%;
        margin-bottom: 10px;
        clear: both;
    }
}

/* ===================================
   STICKY HEADER FOR TABLES
   =================================== */
#axichem-orders-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===================================
   SMOOTH SCROLL BEHAVIOR
   =================================== */
.orders-container,
.orders_body {
    scroll-behavior: smooth;
}

/* Accessibility improvements */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #0073aa !important;
    outline-offset: 2px !important;
}

/* ===================================
   STATUS BADGES
   =================================== */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.status-processing {
    background-color: #cce5ff;
    color: #004085;
    border-color: #b8daff;
}

.status-completed,
.status-delivered {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.order-id {
    font-weight: 600;
    color: #0073aa;
}

/* ===================================
   ORDERS TABS
   =================================== */
.orders-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e1e1e1;
    padding-bottom: 0;
}

.orders-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.orders-tab:hover {
    color: #0073aa;
    background: #f8f9fa;
}

.orders-tab.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    background: #f8f9fa;
}

.orders-tab .tab-icon {
    font-size: 18px;
}

.orders-tab .tab-count {
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.orders-tab.active .tab-count {
    background: #005a87;
}

.orders-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.orders-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================
   DELIVERY STATUS BADGES
   =================================== */
.delivery-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    transition: all 0.2s ease;
}

.delivery-status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.delivery-status-in_transit {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.delivery-status-delivered {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ===================================
   ADMIN DELIVERY CONTROLS
   =================================== */
.delivery-status-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.delivery-status-cell,
.tracking-cell {
    padding: 12px 8px !important;
}

.delivered-date {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.tracking-number-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #23282d;
}

.tracking-icon {
    font-size: 14px;
}

.change-delivery-status,
.edit-tracking {
    margin-top: 4px;
    font-size: 12px !important;
    padding: 4px 10px !important;
}

/* Animation for status updates */
.status-updated,
.tracking-updated {
    animation: highlightUpdate 1s ease;
}

@keyframes highlightUpdate {
    0%, 100% { background-color: transparent; }
    50% { background-color: #d4edda; }
}

/* ===================================
   MODAL STYLES
   =================================== */
.axichem-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.axichem-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.axichem-modal-content h2 {
    margin: 0;
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
    color: #23282d;
    font-size: 20px;
    border-radius: 8px 8px 0 0;
}

.axichem-modal-close {
    color: #666;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.axichem-modal-close:hover,
.axichem-modal-close:focus {
    color: #000;
}

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #23282d;
}

.modal-body .regular-text,
.modal-body select,
.modal-body input[type="text"],
.modal-body input[type="date"],
.modal-body textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.modal-body .regular-text:focus,
.modal-body select:focus,
.modal-body input[type="text"]:focus,
.modal-body input[type="date"]:focus,
.modal-body textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.modal-body .description {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

.form-actions .button {
    padding: 10px 20px;
    font-size: 14px;
}

/* ===================================
   TRACKING INFORMATION
   =================================== */
.tracking-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.estimated-delivery {
    font-weight: 500;
    color: #666;
}

.delivered-date small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #666;
}

/* ===================================
   RESPONSIVE UPDATES FOR NEW FEATURES
   =================================== */
@media (max-width: 768px) {
    .orders-tabs {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
    }
    
    .orders-tab {
        border-bottom: 1px solid #e1e1e1;
        border-left: 3px solid transparent;
        justify-content: space-between;
        bottom: 0;
    }
    
    .orders-tab.active {
        border-bottom-color: #e1e1e1;
        border-left-color: #0073aa;
    }
    
    .axichem-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .button {
        width: 100%;
    }
    
    .delivery-status-wrapper {
        align-items: stretch;
    }
    
    .tracking-number-display {
        flex-wrap: wrap;
    }
}

/* ===================================
   ENHANCED BUTTON STYLES
   =================================== */
.button-small {
    padding: 4px 10px !important;
    font-size: 12px !important;
    height: auto !important;
    line-height: 1.4 !important;
}

.button-primary {
    background-color: #0073aa !important;
    border-color: #0073aa !important;
    color: #fff !important;
}

.button-primary:hover {
    background-color: #005a87 !important;
    border-color: #005a87 !important;
}

.button-primary:disabled {
    background-color: #999 !important;
    border-color: #999 !important;
    cursor: not-allowed !important;
}

/* ===================================
   NOTICE/NOTIFICATION STYLES
   =================================== */
.notice {
    border-left: 4px solid #0073aa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notice-success {
    border-left-color: #46b450;
}

.notice-error {
    border-left-color: #dc3232;
}

/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */
.orders-tab:focus-visible,
.change-delivery-status:focus-visible,
.edit-tracking:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* ===================================
   MODERN HORIZONTAL ORDER FORM
   =================================== */
.modern-order-form {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
    animation: slideDown 0.4s ease;
}

.modern-order-form .form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border-bottom: 3px solid #004c72;
}

.modern-order-form .form-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
}

.modern-order-form .close-form-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-order-form .close-form-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modern-order-form form {
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    display: inline-block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
    margin-bottom: 8px;
    display: block;
}

.form-field label .required {
    color: #dc3232;
    font-weight: bold;
    margin-right: 3px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-control:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.form-control:hover {
    border-color: #0073aa;
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Search Wrapper */
.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #666;
    pointer-events: none;
}

.search-input {
    padding-left: 45px !important;
}

/* Input Group (for $ prefix) */
.input-group {
    position: relative;
    display: flex;
}

.input-prefix {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #666;
    font-weight: 600;
    pointer-events: none;
}

.input-group .form-control {
    padding-left: 35px;
}

/* Textarea */
.form-control[rows] {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Form Actions */
.form-actions-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
    margin-top: 20px;
}

.action-info {
    flex: 1;
}

.required-note {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-buttons .button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.action-buttons .button-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,115,170,0.3);
}

.action-buttons .button-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004c72 100%);
    box-shadow: 0 6px 12px rgba(0,115,170,0.4);
    transform: translateY(-2px);
}

.action-buttons .button-secondary {
    background: #f0f0f0;
    color: #23282d;
}

.action-buttons .button-secondary:hover {
    background: #e0e0e0;
}

.button-icon {
    margin-right: 6px;
}

/* Product Suggestions Enhancement */
#product-suggestions-container {
    position: relative;
}

#product-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: #ffffff;
    border: 2px solid #0073aa;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: -2px;
}

.product-suggestion-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-suggestion-item:hover,
.product-suggestion-item.active {
    background: #f0f8ff;
    border-left: 3px solid #0073aa;
    padding-left: 12px;
}

.product-suggestion-item:last-child {
    border-bottom: none;
}

/* Select Dropdown Enhancement */
select.form-control {
    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='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
    cursor: pointer;
}

/* Date Input Enhancement */
input[type="date"].form-control {
    position: relative;
}

/* Number Input - Remove Spinners */
input[type="number"].form-control {
    -moz-appearance: textfield;
}

input[type="number"].form-control::-webkit-outer-spin-button,
input[type="number"].form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Responsive Design for Form */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-field.full-width {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .modern-order-form form {
        padding: 20px;
    }
    
    .modern-order-form .form-header {
        padding: 15px 20px;
    }
    
    .modern-order-form .form-header h3 {
        font-size: 18px;
    }
    
    .form-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .form-actions-horizontal {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .button {
        width: 100%;
        justify-content: center;
    }
}

/* Form Validation States */
.form-control.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220,50,50,0.1);
}

.form-control.success {
    border-color: #46b450;
    box-shadow: 0 0 0 3px rgba(70,180,80,0.1);
}

/* Loading State */
.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .orders-tabs,
    .change-delivery-status,
    .edit-tracking,
    .button-link-delete,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate,
    .modern-order-form,
    .add-order-container {
        display: none !important;
    }
    
    .orders-tab-content {
        display: block !important;
    }
    
    .delivery-status-badge {
        border: 1px solid #000 !important;
    }
}
