@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    --primary-color: #198754;
    --primary-color-rgb: 25, 135, 84;
}

.bg-success {
    background-color: var(--primary-color) !important;
}

.text-success {
    color: var(--primary-color) !important;
}

.btn-success {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f8f9fa;
    padding-bottom: 80px;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

.bg-success {
    background-color: var(--primary-color) !important;
}

.text-success {
    color: var(--primary-color) !important;
}

.btn-success {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-success-custom {
    background-color: rgba(var(--primary-color-rgb), 0.1) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-success {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-success:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1) !important;
    color: white !important;
}


.border-success {
    border-color: var(--primary-color) !important;
}

.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #dee2e6;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 4000;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
}

@media (min-width: 992px) {
    .bottom-navbar {
        display: none !important;
    }
}

.nav-item-custom {
    text-align: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.75rem;
    flex: 1;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item-custom:active {
    transform: scale(0.9);
}

.nav-item-custom.active {
    color: var(--primary-color);
}

.nav-item-custom svg {
    display: block;
    margin: 0 auto 2px;
    width: 24px;
    height: 24px;
}

#camera-modal {
    z-index: 6000;
}

@media (min-width: 992px) {
    #camera-modal {
        width: 600px !important;
        height: 800px !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%);
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }
}

.z-5000 {
    z-index: 5000;
}

.z-6000 {
    z-index: 6000;
}

.cursor-pointer {
    cursor: pointer;
}

.border-dashed {
    border: 2px dashed #dee2e6;
}

.x-small {
    font-size: 0.7rem;
}

.card-img-top-custom {
    height: 180px;
    object-fit: contain;
    background: #f1f3f5;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dir-rtl {
    direction: rtl;
}

.z-3000 {
    z-index: 3000;
}

#captured-strip {
    display: flex;
    gap: 10px;
    padding: 10px;
}

.captured-item {
    position: relative;
    width: 65px;
    height: 65px;
    flex-shrink: 0;
}

.captured-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid white;
    cursor: pointer;
}

.captured-item-delete {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 1.5px solid white;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.captured-item-check-overlay {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.captured-item-check-overlay input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

/* Camera video styles */
#camera-video {
    transition: opacity 0.1s ease;
}

#camera-error {
    position: absolute;
    z-index: 10;
}

/* Toast warning style */
.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

/* Cursor pointer for clickable elements */
.cursor-pointer {
    cursor: pointer;
}

/* Images Gallery */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
}

@media (min-width: 768px) {
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

.image-card {
    position: relative;
    aspect-ratio: 1;
    /* border-radius: 12px; */
    overflow: hidden;
    cursor: pointer;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    transition: transform 0.2s, box-shadow 0.2s;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 10px;
    font-size: 0.8rem;
}

/* Loading spinner for lazy load */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    aspect-ratio: 1;
    border-radius: 12px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Export Table */
.export-table {
    font-size: 0.9rem;
}

.export-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.export-table td {
    vertical-align: middle;
}

.export-table img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.export-table img:hover {
    transform: scale(1.1);
}

/* Desktop nav active state */
.desktop-nav-btn.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color);
    border-radius: 0;
}


/* Toast container */
#toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 100%;
    max-width: 400px;
    padding: 0 15px;
}

/* Scroll loading indicator */
.scroll-loading {
    text-align: center;
    padding: 20px;
}

.scroll-loading .spinner-border {
    width: 30px;
    height: 30px;
}