/* Dictionary: local insurance reference library */

.dd-search-bar {
    flex-shrink: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-panel);
}

.dd-lookup-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.dd-search-shell {
    position: relative;
    flex: 1;
    min-width: 0;
}

.dd-search-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.dd-search {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
    padding: 0 12px 0 38px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dd-search:focus {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.dd-search::placeholder {
    color: var(--text-muted);
}

.dd-lookup-btn {
    flex: 0 0 auto;
    min-width: 86px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 0 16px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.dd-lookup-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.dd-lookup-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.dd-library-card {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid var(--accent-border);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-dim), transparent), var(--bg-card);
}

.dd-library-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 700;
}

.dd-library-card strong,
.dd-library-card span {
    display: block;
}

.dd-library-card strong {
    color: var(--text-primary);
    font-size: 12.5px;
}

.dd-library-card span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.4;
}

.dd-sidebar-section {
    margin-bottom: 20px;
}

.dd-sidebar-title {
    margin-bottom: 9px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dd-suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.dd-suggestion {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 11px;
    background: var(--bg-card);
    color: var(--text-primary);
    font: inherit;
    font-size: 12px;
    padding: 10px 11px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.dd-suggestion:hover {
    border-color: var(--accent-border);
    background: var(--accent-dim);
    transform: translateY(-1px);
}

.dd-suggestion small {
    color: var(--text-muted);
    font-size: 9.5px;
    white-space: nowrap;
}

.dd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dd-tag {
    display: inline-flex;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 10.5px;
    padding: 6px 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.dd-tag:hover {
    border-color: var(--accent-border);
    background: var(--accent-dim);
    color: var(--accent-text);
}

.dd-letter-group + .dd-letter-group {
    margin-top: 12px;
}

.dd-letter-heading {
    position: sticky;
    top: -1px;
    z-index: 1;
    padding: 5px 2px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-panel);
    color: var(--accent-text);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.dd-term-index {
    display: flex;
    flex-direction: column;
}

.dd-index-term {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 3px;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
}

.dd-index-term:hover {
    color: var(--accent-text);
}

.dd-index-term small {
    overflow: hidden;
    max-width: 42%;
    color: var(--text-muted);
    font-size: 8.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dd-terms-status {
    padding: 12px 3px;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.dd-term-submission {
    margin-top: 4px;
    padding: 10px 11px;
    border: 1px dashed var(--border-soft);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 9.5px;
    line-height: 1.5;
}

.dd-term-submission strong {
    color: var(--text-primary);
}

.dd-term-submission a {
    color: var(--accent-text);
    text-decoration: none;
}

.dd-term-submission a:hover {
    text-decoration: underline;
}

.dd-two-col,
.dd-main-col {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.dd-main-col {
    flex-direction: column;
}

.dd-term-body {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    padding: 24px 26px;
}

.dd-pane-placeholder,
.dd-sidebar-placeholder {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 40px 24px;
    color: var(--text-muted);
    text-align: center;
}

.dd-pane-placeholder p,
.dd-sidebar-placeholder p {
    max-width: 360px;
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.dd-result-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 4px 2px 8px;
}

.dd-result-heading h2 {
    margin: 0;
    color: var(--text-primary);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 500;
    line-height: 1.1;
}

.dd-meta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.dd-meta-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent-text);
    font-size: 10.5px;
    font-weight: 600;
    padding: 6px 10px;
}

.dd-meta-pill-muted {
    border-color: var(--border-soft);
    background: var(--bg-card);
    color: var(--text-muted);
}

.dd-section,
.dd-state-card,
.dd-loading-block {
    border: 1px solid var(--border-soft);
    border-radius: 15px;
    background: var(--bg-card);
    padding: 16px 18px;
}

.dd-definition-card {
    border-left: 3px solid var(--accent);
    padding: 20px 22px;
}

.dd-section h3,
.dd-state-card h3,
.dd-loading-title {
    margin: 0 0 9px;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dd-section p,
.dd-state-card p,
.dd-loading-copy {
    margin: 0;
    color: var(--text-primary);
    font-size: 13.5px;
    line-height: 1.65;
}

.dd-definition {
    font-size: 16px !important;
    line-height: 1.7 !important;
}

.dd-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dd-match-note {
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
}

.dd-dataset-note {
    padding: 11px 13px;
    border: 1px dashed var(--border-soft);
    border-radius: 11px;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.55;
}

.dd-empty-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--bg-panel-soft);
    color: var(--text-muted);
    font-size: 17px;
    font-weight: 700;
}

.dd-state-error {
    border-color: var(--danger-border);
    background: var(--danger-soft);
}

.dd-loading-progress {
    position: relative;
    height: 5px;
    overflow: hidden;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--bg-panel-soft);
}

.dd-loading-progress-bar {
    position: absolute;
    inset: 0 auto 0 -35%;
    width: 35%;
    border-radius: inherit;
    background: var(--accent);
    animation: dd-loading-slide 1.1s ease-in-out infinite;
}

@keyframes dd-loading-slide {
    to { left: 100%; }
}

@media (max-width: 768px) {
    .dd-lookup-form,
    .dd-result-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .dd-lookup-btn {
        min-height: 40px;
    }

    .dd-meta-row {
        justify-content: flex-start;
    }

    .dd-term-body {
        padding: 18px 16px;
    }

    .dd-detail-grid {
        grid-template-columns: 1fr;
    }
}
