/* ODSLocal Data Export – panel styles */

.odslexport-panel {
    font-family: inherit;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    max-width: 860px;
    margin: 0 auto 32px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* Header */
.odslexport-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px 16px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
}

.odslexport-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    padding: 4px;
    flex-shrink: 0;
}

.odslexport-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

/* Sections */
.odslexport-section {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.odslexport-section:last-of-type {
    border-bottom: none;
}

.odslexport-section-title {
    margin: 0 0 14px;
    font-size: .95rem;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Controls row */
.odslexport-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    position: relative;
}

.odslexport-input,
.odslexport-select {
    height: 38px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .9rem;
    background: #fff;
    color: #1e293b;
    outline: none;
    transition: border-color .15s;
}

.odslexport-input:focus,
.odslexport-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.odslexport-search-input {
    min-width: 220px;
    flex: 1;
}

.odslexport-select {
    min-width: 160px;
}

/* Autocomplete */
.odslexport-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.odslexport-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.odslexport-ac-item {
    padding: 9px 14px;
    cursor: pointer;
    font-size: .88rem;
    color: #334155;
    transition: background .1s;
}

.odslexport-ac-item:hover,
.odslexport-ac-item.is-active {
    background: #f0f9ff;
    color: #1e40af;
    outline: none;
}

/* Hint text */
.odslexport-hint {
    margin: 0 0 10px;
    font-size: .84rem;
    /* Raised from #94a3b8 for WCAG AA contrast on white (>= 4.5:1). */
    color: #475569;
}

/* Download buttons */
.odslexport-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.odslexport-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .15s, box-shadow .15s;
    cursor: pointer;
}

.odslexport-btn-csv {
    background: #059669;
    color: #fff !important;
}
.odslexport-btn-csv:hover { background: #047857; }

.odslexport-btn-json {
    background: #2563eb;
    color: #fff !important;
}
.odslexport-btn-json:hover { background: #1d4ed8; }

.odslexport-btn-xlsx {
    background: #7c3aed;
    color: #fff !important;
}
.odslexport-btn-xlsx:hover { background: #6d28d9; }

.odslexport-btn:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

.odslexport-btn--disabled {
    opacity: .45;
    cursor: not-allowed;
    /* pointer-events:none prevents focus; use aria-disabled + click guard in JS. */
}
.odslexport-btn--disabled:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Footer */
.odslexport-footer {
    padding: 14px 24px;
    background: #f8fafc;
    font-size: .82rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
}

.odslexport-footer p {
    margin: 0 0 4px;
}

.odslexport-footer a {
    color: #2563eb;
}

.odslexport-signature {
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 580px) {
    .odslexport-header { padding: 14px 16px; }
    .odslexport-section { padding: 14px 16px; }
    .odslexport-title { font-size: 1rem; }
    .odslexport-logo { height: 34px; }
    .odslexport-controls { flex-direction: column; }
    .odslexport-search-input,
    .odslexport-select { width: 100%; min-width: unset; }
}
