﻿/* ─── Login ──────────────────────────────────────────────────────────────────*/
.login {
    background-color: #F9FAFB;
}

.login-container {
    width: 25rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 2rem;
    background-color: white;
}

.login-container li {
    text-align: center;
}

.login-container ul {
    list-style-type: none;
    padding: 0;
}

/* ─── Form fields ────────────────────────────────────────────────────────────*/
.lot-field-right {
    max-width: 500px;
}

.lot-field-left {
    max-width: 500px;
    margin: 0 0 0 auto;
}

/* ─── Step progress ──────────────────────────────────────────────────────────*/
.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    margin: 2rem 0;
}

.step {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
}

.circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.label {
    margin-top: 4px;
    font-size: 12px;
    color: #777;
    padding-left: 5px;
}

.step.completed .circle { background: #2ecc71; }
.step.completed .label  { color: #2ecc71; }
.step.active .circle    { background: #2563EB; }
.step.active .label     { color: #4285f4; }

.divider {
    width: 40px;
    height: 2px;
    background: #ccc;
    margin: 2px 10px 0 10px;
}

.divider.active {
    background: #4285f4;
}

@media (max-width: 576px) {
    .step {
        flex-direction: column;
        align-items: center;
    }
    .step .label {
        display: none;
    }
    .circle {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* ─── Camera — shared ────────────────────────────────────────────────────────*/
.portait-camera-container,
.landscape-camera-container {
    margin: 0 auto 1rem auto;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
}

.landscape-camera-container {
    max-width: 500px;
}

.portait-camera-trigger,
.landscape-camera-trigger {
    text-align: center;
    padding: 1.5rem;
    border: 3px dashed #dee2e6;
    border-radius: 0.5rem;
    cursor: pointer;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 1rem auto;
    color: #525B69;
    font-size: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portait-camera-trigger  { aspect-ratio: 4 / 4; }
.landscape-camera-trigger { aspect-ratio: 4 / 3; }

.camera-icon {
    color: #9CA3AF;
    font-size: 3rem;
}

/* Wrapper — no fixed height, no flex, canvas drives the size */
.portait-camera-wrapper,
.landscape-camera-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Canvas — hidden by default, JS sets display:block to show */
.canvas {
    display: none;
    position: relative;
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 0.5rem;
    object-fit: contain;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1000;
}

.controls {
    margin: 20px 0 0;
}

.controls button {
    width: 100%;
}

/* ─── Camera — package page overrides ───────────────────────────────────────*/
/* Forces canvas to flow naturally and be visible when JS shows it */
#camera .canvas {
    display: none;
    position: relative !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 80vh !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

/* ─── Camera — item page overrides ──────────────────────────────────────────*/
#cameraContainer .canvas {
    position: relative !important;
    top: unset !important;
    left: unset !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 65vh !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

#cameraContainer #frontPreview,
#cameraContainer #backPreview {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 65vh !important;
    object-fit: contain !important;
    border-radius: 0.5rem;
    display: block;
    margin: 0 auto;
}

/* ─── Camera top bar ─────────────────────────────────────────────────────────*/
.camera-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* max-width: 500px; */
    margin: 0;
    padding: 0 2px;
}


/* ─── Info box ───────────────────────────────────────────────────────────────*/
.info-box {
    border-radius: 0.5rem;
    border: 1px solid #BFDBFE;
    background-color: #EFF6FF;
    color: #2563EB;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-box-lot {
    max-width: 500px;
}

/* ─── Tables ─────────────────────────────────────────────────────────────────*/
.details-table {
    padding: .25rem !important;
}

.item-table {
    border: 2px solid #E5E7EB;
    border-collapse: collapse;
    width: 100%;
}

.item-table th,
.item-table td {
    padding: 0.75rem 1rem !important;
    text-align: left !important;
}

.item-table th {
    font-weight: normal !important;
    background-color: #F9FAFB !important;
    color: #78808C;
    border: none !important;
    box-shadow: none !important;
}

.item-table > :not(:last-child) > :last-child > * {
    border-bottom: none !important;
}

.table-img {
    max-width: 100px;
    max-height: 55px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

/* ─── Collector dropdown ─────────────────────────────────────────────────────*/
#collectorDropdown .loading {
    padding: 0.5rem;
    text-align: center;
    font-style: italic;
    color: #999;
}

#collectorDropdown .dropdown-item {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    width: 95%;
    max-height: 200px;
    overflow-y: auto;
}

/* ─── Card number circle ─────────────────────────────────────────────────────*/
.card-number-circle {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    border-radius: 50%;
    background-color: #EFF6FF;
    color: #0d6efd;
    text-align: center;
    font-weight: bold;
    margin-left: 0.5rem;
}

/* ─── Review / submission pages ──────────────────────────────────────────────*/
.submission-details {
    background-color: #F3F4F6;
    border-radius: 0.5rem;
    padding: 2.5rem;
    width: 50%;
    font-size: 1.25rem;
}

.submission-check {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
    color: #22C55E;
    background-color: #DCFCE7;
}

.submission-items-processed {
    background-color: #EFF6FF;
}

.lot-review-border-box {
    max-width: 583px;
    aspect-ratio: 4/3;
}

.lot-review-img {
    border-radius: 0.5rem;
}

@media (max-width: 1199px) {
    .lot-review-border-box {
        max-width: none;
        aspect-ratio: auto;
    }
}

@media (max-width: 991px) {
    .submission-details {
        width: 75%;
    }
}

@media (max-width: 576px) {
    .submission-details {
        width: 100%;
    }
}