/* PDF Interpreter Modal Styles - Light Theme to match other modals */

.reader_modal {
    padding: 20px;
    font-family: Arial, sans-serif !important;
    color: #000000 !important;
}

/* Enforce Arial and pure black text color globally on modal sub-elements except functional badges/indicators */
.reader_modal h1,
.reader_modal h2,
.reader_modal h3,
.reader_modal p,
.reader_modal span:not(.reader-implant-badge):not(.reader-mobility-badge):not(.reader-pd-deep),
.reader_modal label,
.reader_modal div:not(.reader-implant-badge):not(.reader-mobility-badge):not(.reader-pd-deep):not(.reader-spinner):not(.reader-preview-section):not(.reader-teeth-container):not(.reader-jaw-block):not(.reader-teeth-row),
.reader_modal td,
.reader_modal th {
    font-family: Arial, sans-serif !important;
    color: #000000 !important;
}


.reader-modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0b304a;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #C5DDEE;
    padding-bottom: 10px;
}

.reader-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Drag & Drop Zone */
.reader-drop-zone {
    border: 2.5px dashed #82AAC5;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: #f4f9fc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.reader-drop-zone:hover, .reader-drop-zone.hover {
    border-color: #0076a3;
    background: #eef7fc;
    box-shadow: 0 0 12px rgba(0, 118, 163, 0.15);
}

.reader-drop-zone i {
    font-size: 48px;
    color: #82AAC5;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.reader-drop-zone:hover i {
    transform: translateY(-5px);
    color: #d60f16;
}

.reader-drop-zone p {
    font-size: 16px;
    font-weight: 500;
    margin: 5px 0;
    color: #0b304a;
}

.reader-drop-zone span {
    font-size: 13px;
    color: #777777;
}

/* Metadata Panel */
.reader-meta-card {
    background: #ffffff;
    border: 1px solid #C5DDEE;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.reader-meta-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    color: #0b304a;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reader-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.reader-meta-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
}

.reader-meta-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.reader-meta-val {
    font-size: 15px;
    font-weight: 600;
    color: #0b304a;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Preview Dental Chart */
.reader-preview-section {
    background: #ffffff;
    border: 1px solid #C5DDEE;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.reader-preview-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    color: #0b304a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reader-teeth-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.reader-jaw-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 900px;
}

.reader-jaw-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #0b304a;
    letter-spacing: 0.5px;
}

.reader-teeth-row {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr)) 12px repeat(8, minmax(0, 1fr));
    gap: 4px;
}

.reader-midline-divider {
    grid-column: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.reader-midline-divider::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #82AAC5;
    opacity: 0.5;
}

.reader-tooth-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 3px;
    text-align: center;
    transition: all 0.25s ease;
}

.reader-tooth-card.has-data {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.reader-tooth-card.missing {
    opacity: 0.4;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.reader-furc-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 8px;
}

.reader-invisible {
    visibility: hidden !important;
}

.reader-tooth-id {
    font-size: 13px;
    font-weight: 700;
    color: #0b304a;
}

.reader-tooth-values {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 5px;
}

.reader-surf-section {
    background: rgba(255,255,255,0.7);
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 3px;
    font-size: 9px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reader-surf-lbl {
    font-size: 8px;
    font-weight: 700;
    color: #0b304a;
    text-transform: uppercase;
    text-align: left;
    padding-left: 2px;
}

.reader-surf-grid-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    justify-items: center;
    align-items: center;
}

.reader-square {
    width: 50%;
    height: 5px;
    border-radius: 1px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}

.reader-square.pi-active {
    background: #0076a3;
    border-color: #005f82;
}

.reader-square.bop-active {
    background: #d60f16;
    border-color: #b00b10;
}

.reader-val-txt {
    font-family: monospace;
    font-weight: 700;
    font-size: 8px;
    text-align: center;
    color: #334155;
}

.reader-pd-deep {
    color: #d60f16 !important;
    font-weight: 800;
}

.reader-implant-badge {
    background: #0076a3;
    color: white;
    font-size: 8px;
    font-weight: 800;
    border-radius: 3px;
    padding: 0px 3px;
    text-transform: uppercase;
    display: inline-block;
}

.reader-mobility-badge {
    background: #f59e0b;
    color: white;
    font-size: 8px;
    font-weight: 800;
    border-radius: 3px;
    padding: 0px 3px;
    display: inline-block;
}

.reader-furc-slot {
    width: 8px;
    height: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reader-furc-svg {
    width: 8px;
    height: 8px;
    display: block;
}

/* Modal Controls Overlay Spinner */
.reader-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 12px;
}

.reader-loader-overlay.active {
    display: flex;
}

.reader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(130, 170, 197, 0.2);
    border-radius: 50%;
    border-top-color: #0b304a;
    animation: reader-spin 0.8s linear infinite;
}

@keyframes reader-spin {
    to { transform: rotate(360deg); }
}

.reader-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid #eeeeee;
    padding-top: 20px;
}

#file-input-modal {
    display: none;
}
