/* ==========================================================================
   Taranagar Essentials - ID Card A4 Scanner & Print Tool Styles
   ========================================================================== */

.idcard-scanner-wrapper {
    max-width: 1200px;
    margin: 0 auto 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1e293b;
}

/* Trust Pill & Header */
.idcard-trust-badge-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.idcard-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* Main Grid Layout */
.idcard-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}
@media (max-width: 991px) {
    .idcard-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Card Sections */
.idcard-step-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.idcard-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.idcard-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.12rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.step-num-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
}

/* Mode Switcher */
.mode-tabs-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.mode-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mode-tab-btn.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.15);
}

/* Upload Dropzones */
.scanner-dropzone {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.scanner-dropzone:hover {
    border-color: #2563eb;
    background: #f1f5f9;
}
.scanner-dropzone input[type="file"] {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}
.drop-icon-large {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 6px;
}
.dropzone-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}
.dropzone-sub {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
}

/* Interactive 4-Corner Crop Workspace */
.cropper-modal-workspace {
    margin-top: 14px;
    background: #0f172a;
    border-radius: 12px;
    padding: 12px;
    position: relative;
    overflow: hidden;
}
.cropper-canvas-container {
    position: relative;
    width: 100%;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020617;
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
    touch-action: none;
}
.cropper-canvas-container canvas {
    max-width: 100%;
    max-height: 400px;
    display: block;
    cursor: crosshair;
}
.cropper-controls-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
}
.btn-scanner-tool {
    background: #334155;
    border: 1px solid #475569;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-scanner-tool:hover {
    background: #475569;
}
.btn-apply-crop {
    background: #10b981;
    color: #064e3b;
    font-weight: 800;
    border: none;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.btn-apply-crop:hover {
    background: #059669;
    color: #ffffff;
}

/* Filter selector */
.filter-selector-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}
.filter-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.filter-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Cropped Result Card Preview */
.cropped-preview-box {
    margin-top: 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cropped-thumb-preview {
    max-height: 90px;
    max-width: 140px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    background: #ffffff;
}
.cropped-meta-info {
    flex: 1;
    margin-left: 12px;
}
.cropped-badge-success {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}
.cropped-size-text {
    font-size: 0.8rem;
    color: #475569;
    margin: 0;
}
.btn-reedit {
    background: #ffffff;
    border: 1px solid #94a3b8;
    color: #1e293b;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
}

/* Master Generate Button */
.btn-master-generate-a4 {
    width: 100%;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-master-generate-a4:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.45);
}

/* Download Actions Grid */
.download-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}
.btn-dl-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    color: #ffffff;
    transition: opacity 0.2s ease;
}
.btn-dl-action:hover { opacity: 0.9; }
.btn-dl-pdf { background: #dc2626; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25); }
.btn-dl-img { background: #059669; box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25); }
.btn-dl-print { background: #475569; grid-column: span 2; box-shadow: 0 4px 12px rgba(71, 85, 105, 0.25); }

/* Right Column: Live A4 Canvas Sheet */
.a4-viewport-box {
    background: #cbd5e1;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    position: relative;
    overflow: auto;
}
.a4-paper-sheet {
    position: relative;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1 / 1.414;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.22);
    border-radius: 2px;
}
#master-a4-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}
.a4-empty-hint {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 85%;
    color: #64748b;
}
.empty-printer-icon {
    font-size: 3.2rem;
    margin-bottom: 8px;
}
.a4-empty-hint h4 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #334155;
    font-weight: 800;
}
.a4-empty-hint p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
}

/* Tip Bar */
.print-precision-bar {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #78350f;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-top: 14px;
    line-height: 1.45;
}
