/* ==========================================================================
   WASTELENS BATCH SCAN STYLESHEET
   Clean, simple, consistent design matching WasteLens Scan & History
   ========================================================================== */

/* Progress Card */
#batch-progress-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

/* 4 Disposal Bins Summary Grid */
.batch-bins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.batch-bin-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.batch-bin-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #D1D5DB;
}

.batch-bin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.batch-bin-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.batch-bin-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.batch-bin-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.batch-bin-count {
    font-size: 1.15rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 9999px;
    background: #F3F4F6;
    color: var(--text-main);
}

/* Bin Theme Accents */
.batch-bin-card.banksampah .batch-bin-icon { background: #ECFDF5; color: #059669; }
.batch-bin-card.banksampah .batch-bin-count { background: #ECFDF5; color: #059669; }

.batch-bin-card.organic .batch-bin-icon { background: #F0FDF4; color: #166534; }
.batch-bin-card.organic .batch-bin-count { background: #F0FDF4; color: #166534; }

.batch-bin-card.hazard .batch-bin-icon { background: #FFFBEB; color: #D97706; }
.batch-bin-card.hazard .batch-bin-count { background: #FFFBEB; color: #D97706; }

.batch-bin-card.residual .batch-bin-icon { background: #FEF2F2; color: #DC2626; }
.batch-bin-card.residual .batch-bin-count { background: #FEF2F2; color: #DC2626; }

/* Batch Item Cards (Clean, matching .history-item) */
.batch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: 14px var(--spacing-md);
    border-radius: var(--radius-md);
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.batch-item:hover {
    border-color: #D1D5DB;
    box-shadow: var(--shadow-md);
}

.batch-item-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.batch-item-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #F3F4F6;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.batch-item-thumb-placeholder {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: #F3F4F6;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.batch-item-details {
    min-width: 0;
    flex: 1;
}

.batch-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-item-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.batch-item-meta .meta-category {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.batch-item-meta .meta-divider {
    color: #9CA3AF;
    font-size: 0.75rem;
}

.batch-item-meta .meta-recyclable,
.batch-item-meta .meta-status {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.batch-item-meta .meta-status.status-recyclable {
    color: #059669;
}

.batch-item-meta .meta-status.status-compostable {
    color: #16a34a;
}

.batch-item-meta .meta-status.status-hazardous,
.batch-item-meta .meta-status.status-hazardous---e-waste,
.batch-item-meta .meta-status.status-e-waste {
    color: #d97706;
}

.batch-item-meta .meta-status.status-residual {
    color: #64748b;
}

.batch-item-tip {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 7px;
    padding: 7px 11px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 0.815rem;
    line-height: 1.42;
    color: #475569;
}

.batch-item-tip i {
    color: #059669;
    font-size: 0.95rem;
    margin-top: 1px;
    flex-shrink: 0;
}

body.dark .batch-item-tip {
    background: rgba(30, 41, 59, 0.55);
    border-color: rgba(51, 65, 85, 0.7);
    color: #cbd5e1;
}

body.dark .batch-item-tip i {
    color: #34d399;
}

/* Clear Batch Confirmation Dialog */
#batch-clear-confirm-dialog {
    border: 1px solid #FECACA;
    background: #FEF2F2;
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

body.dark #batch-clear-confirm-dialog {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Hide unused colorful bin grids */
#batch-bins-summary,
.batch-bins-grid {
    display: none !important;
}

/* Quantity Controls & Delete Action */
.batch-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.batch-qty-control {
    display: inline-flex;
    align-items: center;
    background: #F3F4F6;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.batch-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.batch-qty-btn:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
}

.batch-qty-val {
    min-width: 24px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    padding: 0 4px;
}

.btn-batch-remove-item {
    color: #9CA3AF;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-batch-remove-item:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Toast Notifications */
.toast-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #111827;
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.toast-popup.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .batch-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .batch-item-left {
        width: 100%;
    }
    .batch-item-right {
        width: 100%;
        justify-content: space-between;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }
    .toast-popup {
        left: 16px;
        right: 16px;
        bottom: 80px;
    }
}

/* ==========================================================================
   BATCH SCAN VISUAL USER GUIDE (Panduan Foto Sampah Ideal untuk Groq AI)
   ========================================================================== */
.batch-guide-wrapper {
    background: #FFFFFF;
    border: 1px solid #D1FAE5;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.05);
    transition: all 0.25s ease;
}

.batch-guide-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-guide-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.batch-guide-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    background: #ECFDF5;
    color: #059669;
    font-size: 0.75rem;
    font-weight: 700;
    width: fit-content;
    border: 1px solid #A7F3D0;
}

.batch-guide-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    line-height: 1.3;
}

.batch-guide-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.btn-toggle-guide {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-toggle-guide:hover {
    background: #E5E7EB;
    color: var(--primary-dark);
}

.batch-guide-content {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.25s ease;
}

.batch-guide-content.collapsed {
    display: none;
}

/* Mobile-only carousel elements (hidden on desktop) */
.batch-guide-mobile-pagination {
    display: none;
}

.batch-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.batch-guide-item {
    background: #F9FAFB;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.batch-guide-item:hover {
    border-color: #10B981;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.batch-guide-img-container {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #E5E7EB;
    position: relative;
}

.batch-guide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.batch-guide-item:hover .batch-guide-img {
    transform: scale(1.03);
}

.batch-guide-step-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.batch-guide-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.batch-guide-step-title {
    font-size: 0.925rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.3;
}

.batch-guide-step-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 10px;
    flex: 1;
}

.guide-dos-donts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
}

.guide-badge-do {
    color: #059669;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.guide-badge-dont {
    color: #DC2626;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.batch-guide-tips-footer {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.batch-guide-tip-col {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: #166534;
    line-height: 1.4;
}

.batch-guide-tip-col i {
    font-size: 1rem;
    color: #059669;
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .batch-hero-mockup-card {
        height: 140px;
        border-radius: 12px;
    }
    .batch-guide-wrapper {
        padding: 14px 12px;
        border-radius: 12px;
        margin-bottom: var(--spacing-md);
        box-sizing: border-box;
    }
    .batch-guide-header {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .batch-guide-top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .batch-guide-badge {
        font-size: 0.72rem;
        padding: 3px 9px;
    }
    .btn-toggle-guide {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    .batch-guide-title {
        font-size: 1.05rem;
        font-weight: 800;
        color: var(--text-main);
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        line-height: 1.35;
        width: 100%;
        letter-spacing: -0.01em;
    }
    .batch-guide-desc {
        font-size: 0.82rem;
        color: var(--text-muted);
        line-height: 1.45;
        margin: 0;
        width: 100%;
    }
    
    /* Horizontal Swipeable Slider - Eliminates vertical scrolling */
    .batch-guide-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 12px !important;
        padding: 2px 2px 6px 2px !important;
        scrollbar-width: none !important;
        margin: 0 !important;
    }
    .batch-guide-grid::-webkit-scrollbar {
        display: none !important;
    }
    .batch-guide-item {
        flex: 0 0 88% !important;
        min-width: 260px !important;
        max-width: 320px !important;
        scroll-snap-align: center !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
        border-radius: 12px !important;
        background: #FFFFFF !important;
        border: 1px solid var(--border-color) !important;
        margin: 0 !important;
    }
    .batch-guide-img-container {
        height: 125px !important;
        aspect-ratio: auto !important;
    }
    .batch-guide-step-tag {
        font-size: 0.68rem;
        padding: 2px 7px;
    }
    .batch-guide-body {
        padding: 10px 12px !important;
    }
    .batch-guide-step-title {
        font-size: 0.88rem !important;
        margin-bottom: 3px !important;
    }
    .batch-guide-step-text {
        font-size: 0.76rem !important;
        line-height: 1.35 !important;
        margin-bottom: 8px !important;
    }
    .guide-dos-donts {
        padding-top: 6px !important;
        font-size: 0.72rem !important;
        gap: 3px !important;
    }

    /* Slider Dot Pagination & Hint */
    .batch-guide-mobile-pagination {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 4px 2px 0 2px;
    }
    .batch-guide-dots {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .guide-dot {
        width: 8px;
        height: 8px;
        border-radius: 9999px;
        background: #D1D5DB;
        border: none;
        padding: 0;
        cursor: pointer;
        transition: all 0.25s ease;
    }
    .guide-dot.active {
        width: 20px;
        background: var(--primary);
    }
    .batch-guide-swipe-hint {
        font-size: 0.72rem;
        color: var(--text-muted);
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-weight: 500;
    }

    /* Compact Horizontal Footer Tips */
    .batch-guide-tips-footer {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 8px !important;
        padding: 8px 10px !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 10px !important;
    }
    .batch-guide-tips-footer::-webkit-scrollbar {
        display: none !important;
    }
    .batch-guide-tip-col {
        flex: 0 0 85% !important;
        min-width: 220px !important;
        scroll-snap-align: start !important;
        font-size: 0.74rem !important;
        gap: 6px !important;
        background: #FFFFFF !important;
        padding: 7px 9px !important;
        border-radius: 8px !important;
        border: 1px solid #DCFCE7 !important;
    }
    .batch-dropzone {
        padding: 20px 14px;
        border-radius: 14px;
    }
    .batch-dropzone-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .batch-dropzone-actions button {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }
    .batch-bins-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .batch-bin-summary-card {
        padding: 12px 10px;
        border-radius: 12px;
    }
    #batch-footer-actions {
        flex-direction: column !important;
        width: 100%;
        gap: 8px;
    }
    #batch-footer-actions button {
        width: 100% !important;
        justify-content: center;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .batch-bins-grid {
        grid-template-columns: 1fr;
    }
}
