/* Customer Order & App Custom Mobile-First Styling - Bootstrap 5.2 Enhancement */

:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --primary-light: #ecfdf5;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f8fafc;
    --border-color: #cbd5e1;
}

body.customer-order-body {
    background-color: var(--bg-light);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Navbar Styling */
.top-header-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    min-height: 52px;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.brand-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-dark);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* Main Container Layout */
.app-viewport-container {
    max-width: 768px;
    margin: 0 auto;
    padding: 10px 10px 30px 10px;
}

.main-order-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    padding: 14px;
}

/* Selected Karigar Banner */
.karigar-banner {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Compact Nav Input Groups */
.nav-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-input-group .form-control {
    font-weight: 600;
}

.btn-nav-arrow {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-dark);
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-nav-arrow:hover {
    background: var(--bg-light);
    border-color: #94a3b8;
}

/* Modern Form Controls */
.form-label-compact {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
    display: block;
}

.form-control-compact {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    min-height: 38px;
}

.form-control-compact:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Dropzone Styling */
.dropzone-container {
    background-color: var(--primary-light);
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-bottom: 10px;
}

.dropzone-container:hover,
.dropzone-container.dragover {
    background-color: #d1fae5;
    border-color: var(--primary-hover);
}

.dropzone-title {
    font-size: 13px;
    font-weight: 700;
    color: #065f46;
    margin-top: 4px;
    margin-bottom: 2px;
}

.dropzone-subtitle {
    font-size: 11px;
    color: #047857;
}

/* Uploaded Grid & Thumbnails */
.uploaded-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.thumb-card {
    width: 80px;
    position: relative;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.thumb-add-card:hover {
    background: #d1fae5 !important;
    border-color: #059669 !important;
}

.thumb-card img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.thumb-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.thumb-remove {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #ffffff;
    color: #ef4444;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.thumb-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    opacity: 0.95;
    transition: opacity 0.2s ease-in-out;
    cursor: pointer;
}

/* Save Button */
.btn-save-order {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    transition: background-color 0.15s ease;
    min-height: 44px;
}

.btn-save-order:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
}

/* Product Delivery Date Header Bar */
.delivery-date-banner {
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 8px;
    padding: 2px 14px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Responsive Mobile Layout adjustments */
@media (max-width: 576px) {
    .brand-title {
        font-size: 12px;
        max-width: 170px;
    }

    .top-header-nav {
        min-height: 48px;
        padding: 0 8px;
    }

    .app-viewport-container {
        padding: 8px 8px 24px 8px;
    }

    .main-order-card {
        padding: 12px;
        border-radius: 10px;
    }
}

/* Karigar First Mode Ultra-Compressed Horizontal Layout */
.karigar-mode-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 6px 8px 16px 8px;
    background-color: #f3f4f6;
    min-height: 10vh;
    max-height: 30vh;
}

.karigar-mode-header {
    background-color: #0d8343;
    height: 44px;
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 0 10px;
}

.karigar-mode-header .brand-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.karigar-mode-header .date-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
}

.km-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.km-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
}

.km-card-title i {
    color: #16a34a;
    font-size: 14px;
}

.karigar-select-card {
    padding: 2px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-top: -12px;
    margin-bottom: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    z-index: 1020;
}

.karigar-avatar-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #e8f7ee;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}

.karigar-select-card .label-text {
    font-size: 10.5px;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 1px;
}

.karigar-select-card .name-text {
    font-size: 13.5px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.km-dropzone-horizontal {
    background-color: #f0fdf4;
    border: 1.5px dashed #22c55e;
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.km-dropzone-horizontal:hover {
    background-color: #dcfce7;
}

.km-dropzone-horizontal .cloud-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.km-dropzone-horizontal .upload-text-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.km-dropzone-horizontal .upload-heading {
    font-size: 12.5px;
    font-weight: 700;
    color: #15803d;
    line-height: 1.25;
}

.km-dropzone-horizontal .upload-sub1 {
    font-size: 11px;
    color: #4b5563;
    line-height: 1.2;
}

.km-dropzone-horizontal .upload-sub2 {
    font-size: 10px;
    color: #9ca3af;
    line-height: 1.2;
}

.km-preview-label {
    font-size: 10.5px;
    color: #6b7280;
    font-weight: 500;
    margin-top: 4px;
}

.km-field-box {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 3px 8px;
    transition: all 0.15s ease-in-out;
}

.km-field-box:focus-within {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

.km-field-box .km-label {
    font-size: 10px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0px;
    display: block;
    line-height: 1.1;
    margin-top: -8px;
    ;
    background: #ffffff;
    width: fit-content;
}

.km-field-box .km-label .req-star {
    color: #ef4444 !important;
    font-weight: 700;
}

.km-field-box .km-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.km-field-box .km-icon {
    color: #16a34a;
    font-size: 12px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.km-field-box .km-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 14px 2px !important;
    font-size: 12.5px;
    font-weight: 500;
    color: #1f2937;
    background: transparent;
    width: 100%;
    height: 18px;
    line-height: 18px;
}

.km-field-box .km-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.km-textarea {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12.5px;
    color: #1f2937;
    outline: none;
    width: 100%;
}

.km-textarea:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

.km-date-box {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 3px 8px;
    background: #ffffff;
    min-width: 135px;
}

.km-btn-save {
    background-color: #0d8343;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-top: 2px;
    margin-bottom: 10px;
}

.km-btn-save:hover {
    background-color: #0a6c37;
    color: #ffffff;
}