/* ===================================
   NOTARY DOCUMENT LIBRARY — FRONTEND
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

.ndl-library {
    font-family: 'Source Sans 3', sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    color: #1a1a2e;
}

/* HEADER */
.ndl-library-header {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    border-radius: 16px 16px 0 0;
    padding: 40px 36px 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.ndl-library-header::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.ndl-library-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.ndl-library-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin: 0 0 6px;
    color: #fff;
    letter-spacing: -0.5px;
}
.ndl-library-desc {
    margin: 0;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}
.ndl-doc-count {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    align-self: center;
}

/* CONTROLS */
.ndl-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ndl-search-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
}
.ndl-search-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
}
.ndl-search-input {
    width: 100%;
    padding: 11px 40px 11px 42px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Source Sans 3', sans-serif;
    background: rgba(255,255,255,0.12);
    color: #fff;
    outline: none;
    transition: background 0.2s;
    box-sizing: border-box;
}
.ndl-search-input::placeholder { color: rgba(255,255,255,0.55); }
.ndl-search-input:focus { background: rgba(255,255,255,0.2); }
.ndl-clear-search {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer; font-size: 14px;
    padding: 4px;
}
.ndl-select {
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    background: rgba(255,255,255,0.12);
    color: #fff;
    outline: none;
    cursor: pointer;
    min-width: 160px;
}
.ndl-select option { background: #203a43; color: #fff; }

/* ALPHA NAV */
.ndl-alpha-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.ndl-alpha-link {
    display: inline-block;
    width: 30px; height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: all 0.15s;
    background: rgba(255,255,255,0.06);
}
.ndl-alpha-link:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* RESULTS */
.ndl-results {
    background: #f8f9fc;
    border-radius: 0 0 16px 16px;
    border: 1px solid #e2e8f0;
    border-top: none;
    padding: 0 0 32px;
}

/* ALPHA SECTIONS */
.ndl-alpha-section { margin-bottom: 8px; }
.ndl-alpha-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #203a43;
    padding: 28px 36px 12px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.ndl-alpha-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
    display: block;
}

/* DOC GRID */
.ndl-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0 36px;
}

/* DOC CARD */
.ndl-doc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}
.ndl-doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    border-color: #cbd5e1;
}
.ndl-doc-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.ndl-doc-icon { font-size: 1.8rem; line-height: 1; }
.ndl-doc-meta-top {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.ndl-doc-type {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: #0f2027;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
}
.ndl-doc-category {
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}
.ndl-doc-body { flex: 1; }
.ndl-doc-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a1a2e;
    line-height: 1.35;
}
.ndl-doc-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ndl-doc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.ndl-doc-size {
    font-size: 0.78rem;
    color: #94a3b8;
}
.ndl-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #0f2027, #2c5364);
    color: #fff;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}
.ndl-download-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* EMPTY / NO RESULTS */
.ndl-empty,
.ndl-no-results {
    text-align: center;
    padding: 64px 32px;
    color: #94a3b8;
}
.ndl-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.ndl-no-results p { font-size: 1rem; margin-bottom: 16px; }
.ndl-btn-clear-search {
    background: #0f2027;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* LOGIN NOTICE */
.ndl-login-notice {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #203a43;
    padding: 20px 24px;
    border-radius: 8px;
    font-family: 'Source Sans 3', sans-serif;
}

@media (max-width: 640px) {
    .ndl-library-header { padding: 28px 20px 20px; }
    .ndl-doc-grid { grid-template-columns: 1fr; padding: 0 16px; }
    .ndl-alpha-heading { padding: 20px 16px 10px; }
    .ndl-library-title { font-size: 1.5rem; }
}
