/* POS Forms - Comprehensive CSS for all forms and inline styles */

/* ===========================================
   LAYOUT & STRUCTURE
   =========================================== */

/* Loading Spinner */
.loading-spinner {
    width: 40%;
    top: 20%;
    left: 29%;
    position: absolute;
}

/* Logo Styles */
.logo-main {
    height: 89%;
}

.logo-fold {
    height: 69%;
}

/* Login Background */
.login-background {
    background-image: url('../themes/assets/images/others/login-3.png');
}

/* ===========================================
   FORM CONTAINERS & LAYOUTS
   =========================================== */

/* Invoice Container */
.invoice-container {
    flex: 1;
    margin-right: 5px;
}

/* Search Field */
.search-field {
    width: 200px;
}

/* Search Field Container */
.search-field-container {
    display: flex;
    gap: 10px;
    align-items: end;
    height: 100%;
}

.search-field-container.short {
    height: 80%;
}

/* Search Forms */
.search-form {
    display: none; /* Hidden by default */
    background: #f8f9fa;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-form form {
    margin-bottom: 0;
}

.search-button-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-end;
}

.search-button {
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button i {
    margin-right: 5px;
}

/* Card Hidden State */
.card-hidden {
    display: none;
}

.card-header-hidden {
    display: none;
}

/* ===========================================
   INPUT FIELDS & CONTROLS
   =========================================== */

/* Invoice Inputs */
.invoice-input {
    width: 120px;
}

.invoice-input-small {
    width: 100px;
}

/* Legacy Form Elements */
.legacy-search-button {
    height: 27px;
}

.legacy-title {
    font-size: 24px;
    text-align: center;
    width: 70%;
}

.legacy-header {
    text-align: center;
    background-color: #06F;
}

.legacy-search-field {
    margin-left: 82%;
    width: 15%;
    height: 13px;
}

.legacy-product-row {
    margin-left: 50px;
}

.legacy-remove-icon {
    width: 20px;
    float: left;
}

.legacy-nav-button {
    width: 10%;
}

.legacy-row-hidden {
    display: none;
}

/* ===========================================
   TABLES & DATA DISPLAY
   =========================================== */

/* Table Responsive Containers */
.table-responsive-store {
    max-height: 350px;
}

.table-responsive-store-forms {
    max-height: 350px;
}

.table-responsive-admin {
    max-height: 400px;
    overflow-y: auto;
}

/* Table Header Widths - StoreIn Create */
.storein-create-table th:nth-child(1) { width: 3%; }  /* # */
.storein-create-table th:nth-child(2) { width: 10%; } /* Code */
.storein-create-table th:nth-child(3) { width: 12%; } /* Company */
.storein-create-table th:nth-child(4) { width: 30%; } /* Item */
.storein-create-table th:nth-child(5) { width: 7%; }  /* Qty */
.storein-create-table th:nth-child(6) { width: 7%; }  /* Rate */
.storein-create-table th:nth-child(7) { width: 8%; }  /* Dis(%) */
.storein-create-table th:nth-child(8) { width: 8%; }  /* Cost */
.storein-create-table th:nth-child(9) { width: 10%; } /* Total */
.storein-create-table th:nth-child(10) { width: 5%; } /* Action */

/* Table Header Widths - StoreIn Update */
.storein-update-table th:nth-child(1) { width: 3%; }  /* # */
.storein-update-table th:nth-child(2) { width: 8%; }  /* Code */
.storein-update-table th:nth-child(3) { width: 10%; } /* Company */
.storein-update-table th:nth-child(4) { width: 25%; } /* Item */
.storein-update-table th:nth-child(5) { width: 8%; }  /* Qty */
.storein-update-table th:nth-child(6) { width: 8%; }  /* Rate */
.storein-update-table th:nth-child(7) { width: 8%; }  /* Dis % */
.storein-update-table th:nth-child(8) { width: 8%; }  /* Cost */
.storein-update-table th:nth-child(9) { width: 10%; } /* Total */
.storein-update-table th:nth-child(10) { width: 5%; } /* Action */

/* Table Header Widths - StoreOut Create */
.storeout-create-table th:nth-child(1) { width: 3%; }  /* # */
.storeout-create-table th:nth-child(2) { width: 10%; } /* Code */
.storeout-create-table th:nth-child(3) { width: 30%; } /* Item */
.storeout-create-table th:nth-child(4) { width: 8%; }  /* Qty */
.storeout-create-table th:nth-child(5) { width: 8%; }  /* Rate */
.storeout-create-table th:nth-child(6) { width: 8%; }  /* Dis % */
.storeout-create-table th:nth-child(7) { width: 8%; }  /* Price */
.storeout-create-table th:nth-child(8) { width: 10%; } /* Total */
.storeout-create-table th:nth-child(9) { width: 5%; }  /* Action */

/* Table Header Widths - StoreOut Update */
.storeout-update-table th:nth-child(1) { width: 3%; }  /* # */
.storeout-update-table th:nth-child(2) { width: 10%; } /* Code */
.storeout-update-table th:nth-child(3) { width: 30%; } /* Item */
.storeout-update-table th:nth-child(4) { width: 8%; }  /* Qty */
.storeout-update-table th:nth-child(5) { width: 8%; }  /* Rate */
.storeout-update-table th:nth-child(6) { width: 8%; }  /* Dis % */
.storeout-update-table th:nth-child(7) { width: 8%; }  /* Price */
.storeout-update-table th:nth-child(8) { width: 10%; } /* Total */
.storeout-update-table th:nth-child(9) { width: 5%; }  /* Action */

/* Table Header Widths - StoreOut Purchase Return */
.storeout-preturn-table th:nth-child(1) { width: 3%; }  /* # */
.storeout-preturn-table th:nth-child(2) { width: 10%; } /* Code */
.storeout-preturn-table th:nth-child(3) { width: 30%; } /* Item */
.storeout-preturn-table th:nth-child(4) { width: 8%; }  /* Qty */
.storeout-preturn-table th:nth-child(5) { width: 8%; }  /* Rate */
.storeout-preturn-table th:nth-child(6) { width: 8%; }  /* Dis % */
.storeout-preturn-table th:nth-child(7) { width: 10%; } /* Price */
.storeout-preturn-table th:nth-child(8) { width: 10%; } /* Total */
.storeout-preturn-table th:nth-child(9) { width: 5%; }  /* Action */

/* Table Header Widths - StoreIn Return */
.storein-return-table th:nth-child(1) { width: 3%; }  /* # */
.storein-return-table th:nth-child(2) { width: 10%; } /* Code */
.storein-return-table th:nth-child(3) { width: 12%; } /* Company */
.storein-return-table th:nth-child(4) { width: 30%; } /* Item */
.storein-return-table th:nth-child(5) { width: 7%; }  /* Qty */
.storein-return-table th:nth-child(6) { width: 7%; }  /* Cost */
.storein-return-table th:nth-child(7) { width: 10%; } /* Total */
.storein-return-table th:nth-child(8) { width: 5%; }  /* Action */

/* Table Cell Alignment */
.table-cell-center {
    text-align: center;
}

/* ===========================================
   BUTTONS & ACTIONS
   =========================================== */

/* Navigation Buttons */
.nav-button {
    min-width: 80px;
}

/* Action Buttons */
.action-buttons-container {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.action-buttons-flex {
    display: flex;
    gap: 5px;
    justify-content: center;
}

/* Export Buttons */
.export-button {
    margin: 0 5px;
    color: #FFF;
}

.export-container {
    float: right;
}

/* ===========================================
   STOCK & INVENTORY VIEWS
   =========================================== */

/* Stock Transaction Headers */
.stock-header {
    font-size: 1.2em;
    margin: 0;
    display: inline;
}

.stock-subtitle {
    font-size: 0.8em;
    margin-left: 10px;
}

.stock-label {
    font-size: 0.9em;
    font-weight: 600;
}

.stock-badge {
    margin-left: 5px;
}

.stock-warehouse {
    font-size: 0.8em;
}

.stock-clear {
    clear: both;
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

/* Display States */
.hidden {
    display: none;
}

/* Float Utilities */
.float-right {
    float: right;
}

.float-right-top {
    float: right;
    margin-top: 5px;
}

.float-left-inline {
    float: left;
    display: inline-block;
}

.float-left-inline-offset {
    float: left;
    margin-left: 300px;
    display: inline-block;
}

.clear-both {
    clear: both;
}

/* Margin Utilities */
.margin-left-50 {
    margin-left: 50px;
}

.margin-left-5 {
    margin-left: 5px;
}

.margin-left-1 {
    margin-left: 1px;
}

.margin-top-5 {
    margin-top: 5px;
}

.margin-top-7 {
    margin-top: 7px;
}

.margin-top-10 {
    margin-top: 10px;
}

.margin-right-5 {
    margin-right: 5px;
}

/* Product Row */
.product-row {
    margin-left: 50px;
}

/* Icon Styles */
.icon-small {
    width: 20px;
}

/* Table Width Utilities */
.table-full-width {
    width: 100%;
}

.table-half-width {
    width: 49%;
}

/* Form Sections */
.form-section {
    width: 100%;
    margin-top: 36px;
}

.form-section-right {
    width: 100%;
    margin-left: 570px;
}

/* Logo Container */
.logo-container {
    width: 5%;
    float: left;
    margin-top: -28px;
}

/* Signature Fields */
.signature-field {
    width: 150px;
    font-size: 20px;
    color: black;
}

.signature-section {
    margin-top: 700px;
    float: left;
    display: inline-block;
}

.signature-section-bottom {
    margin-top: 100px;
    float: left;
    display: inline-block;
}

.signature-section-bottom-offset {
    margin-top: 100px;
    float: left;
    margin-left: 300px;
    display: inline-block;
}

.signature-section-offset {
    margin-top: 700px;
    float: left;
    margin-left: 300px;
    display: inline-block;
}

/* Grid Utilities */
.grid-80 {
    width: 80%;
}

/* Print Styles */
.sheet-auto-height {
    height: auto;
}

.print-container {
    width: 950px;
    height: 1350px !important;
    overflow: scroll;
}

.print-title {
    font-size: 34px;
    text-align: center;
    width: 100%;
    text-decoration: underline;
}

.invoice-title {
    font-size: 32px;
    margin-top: 7px;
    text-align: center;
}

.invoice-info {
    font-size: 16px;
    text-align: left;
    font-family: Tahoma, Geneva, sans-serif;
    border-bottom: 1px solid;
}

.invoice-info-bottom {
    font-size: 16px;
    text-align: left;
    font-family: Tahoma, Geneva, sans-serif;
    border-bottom: 1px solid;
    margin-top: -15px;
}

.logo-print {
    margin-top: 40px;
    margin-left: 10px;
    width: 100%;
}

/* Typography Utilities */
.text-large {
    font-size: 20px;
}

.text-medium {
    font-size: 18px;
}

.text-white {
    color: #FFF;
}

.text-black {
    color: black;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-underline {
    text-decoration: underline;
}

/* Background Utilities */
.bg-blue {
    background-color: #06F;
}

/* Border Utilities */
.border-black {
    border: 1px #000000 solid;
}

.table-bordered {
    border: 1px solid;
}

/* Flexbox Utilities */
.flex-1 {
    flex: 1;
}

/* Action Buttons Center */
.action-buttons-center {
    text-align: center;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

@media (max-width: 768px) {
    /* Layout adjustments */
    .loading-spinner {
        width: 60%;
        top: 30%;
        left: 20%;
    }
    
    .logo-main {
        height: 70%;
    }
    
    .logo-fold {
        height: 50%;
    }
    
    /* Form adjustments */
    .invoice-input {
        width: 100px;
    }
    
    .invoice-input-small {
        width: 80px;
    }
    
    .search-field {
        width: 150px;
    }
    
    .search-field-container {
        flex-direction: column;
        gap: 5px;
        height: auto;
    }
    
    .search-field-container.short {
        height: auto;
    }
    
    /* Table adjustments */
    .table-responsive-store,
    .table-responsive-store-forms,
    .table-responsive-admin {
        max-height: 300px;
    }
    
    /* Button adjustments */
    .nav-button {
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    /* Legacy form adjustments */
    .legacy-title {
        font-size: 18px;
        width: 100%;
    }
    
    .legacy-search-field {
        margin-left: 0;
        width: 100%;
        height: auto;
    }
    
    .legacy-product-row {
        margin-left: 10px;
    }
    
    .legacy-nav-button {
        width: auto;
        min-width: 60px;
    }
    
    /* Stock view adjustments */
    .stock-header {
        font-size: 1em;
    }
    
    .stock-subtitle {
        font-size: 0.7em;
        margin-left: 5px;
    }
    
    .stock-label {
        font-size: 0.8em;
    }
    
    .stock-warehouse {
        font-size: 0.7em;
    }
    
    .export-container {
        float: none;
        text-align: center;
        margin-bottom: 10px;
    }
    
    /* Action buttons adjustments */
    .action-buttons-flex {
        flex-direction: column;
        gap: 2px;
    }
    
    .table-cell-center {
        text-align: left;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .invoice-input {
        width: 80px;
    }
    
    .invoice-input-small {
        width: 60px;
    }
    
    .search-field {
        width: 120px;
    }
    
    .nav-button {
        min-width: 50px;
        font-size: 0.7rem;
    }
    
    .legacy-title {
        font-size: 16px;
    }
    
    .stock-header {
        font-size: 0.9em;
    }
}
