/* Adler Business Directory — Admin Styles */

.abd-wrap { max-width: 1200px; }

/* ── Header Bar ────────────────────────────────── */

.abd-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 20px;
    margin: 16px 0 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.abd-admin-logo {
    width: 220px;
    height: auto;
    display: block;
}
.abd-header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
}
.abd-version-badge {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
    color: #374151;
    font-weight: 600;
}
.abd-header-link {
    color: #b08d3c;
    text-decoration: none;
    font-weight: 500;
}
.abd-header-link:hover { text-decoration: underline; color: #8a6c2a; }

/* ── Home Toolbar ──────────────────────────────── */

.abd-home-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.abd-home-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.abd-stat-pill {
    background: #f0f6ff;
    border: 1px solid #c7d9f8;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    color: #1e40af;
}
.abd-stat-pill strong { font-size: 15px; margin-right: 3px; }

.abd-btn-add { font-size: 13px !important; }

/* ── Create Form Panel ─────────────────────────── */

.abd-create-form-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
    max-width: 620px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.abd-create-fields {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.abd-create-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 200px;
}
.abd-create-field label { font-size: 13px; font-weight: 600; color: #374151; }

/* ── Empty State ───────────────────────────────── */

.abd-empty-state {
    background: #fff;
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    padding: 60px 40px;
    text-align: center;
    color: #6b7280;
}
.abd-empty-icon { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.abd-empty-title { font-size: 16px; font-weight: 600; color: #374151; margin: 0 0 6px; }
.abd-empty-sub { margin: 0; font-size: 14px; }

/* ── Directory Cards ───────────────────────────── */

.abd-dir-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 4px;
}

.abd-dir-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow .15s, border-color .15s;
}
.abd-dir-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    border-color: #c7d9f8;
}

.abd-dir-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.abd-dir-card-icon { font-size: 22px; line-height: 1; }

.abd-dir-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1d2327;
    text-decoration: none;
    line-height: 1.3;
}
.abd-dir-card-name:hover { color: #2271b1; }

.abd-dir-card-count {
    font-size: 13px;
    color: #6b7280;
}

.abd-dir-card-shortcode {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    overflow: hidden;
}
.abd-dir-card-shortcode:hover { background: #eff6ff; border-color: #93c5fd; }
.abd-dir-card-shortcode.copied { background: #d1fae5; border-color: #6ee7b7; }
.abd-dir-card-shortcode code {
    font-size: 11px;
    color: #374151;
    background: none;
    padding: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.abd-copy-hint {
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
}

.abd-dir-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}
.abd-dir-card-actions .button { font-size: 12px; }

/* Add New Card */
.abd-dir-card--new {
    border: 2px dashed #d1d5db;
    background: #fafafa;
    box-shadow: none;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    color: #9ca3af;
    transition: border-color .15s, color .15s, background .15s;
}
.abd-dir-card--new:hover {
    border-color: #2271b1;
    color: #2271b1;
    background: #f0f7ff;
    box-shadow: none;
}
.abd-new-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}
.abd-new-icon {
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
}

/* Type badge colors */
.abd-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 2px 8px;
    border-radius: 20px;
}
.abd-type-business  { background: #dbeafe; color: #1e40af; }
.abd-type-member    { background: #d1fae5; color: #065f46; }
.abd-type-employee  { background: #fef3c7; color: #92400e; }

/* legacy badge (used in breadcrumb) */
.abd-dir-breadcrumb .abd-type-badge {
    background: #e0e7ff;
    color: #3730a3;
    font-size: 11px;
}

/* ── Stats Bar (legacy, kept for compat) ─────── */

.abd-stats-bar {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: #f0f6ff;
    border: 1px solid #c7d9f8;
    border-radius: 6px;
    padding: 8px 16px;
    margin: 12px 0;
    font-size: 13px;
    color: #1d4ed8;
}

.abd-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0 16px;
}
.abd-filter-form input[type="search"],
.abd-filter-form select {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #c9cfd8;
    border-radius: 4px;
}

.abd-listings-table th,
.abd-listings-table td { vertical-align: middle; }
.abd-no-logo { color: #999; }
.abd-delete-btn { color: #b91c1c !important; }
.abd-delete-btn:hover { background: #fee2e2 !important; }

.abd-pagination { margin-top: 16px; }

/* Import/Export */
.abd-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

@media (max-width: 900px) { .abd-card-row { grid-template-columns: 1fr; } }

.abd-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.abd-card h2 { margin-top: 0; font-size: 16px; }

.abd-import-dropzone {
    border: 2px dashed #c9cfd8;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    margin: 12px 0;
    background: #f9fafb;
}
.abd-import-dropzone:hover,
.abd-import-dropzone.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}
.abd-import-dropzone .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #6b7280;
    margin-bottom: 8px;
}
.abd-import-dropzone p { margin: 4px 0; color: #6b7280; font-size: 13px; }
.abd-file-label { color: #2563eb; cursor: pointer; text-decoration: underline; }
.abd-file-name { color: #2563eb; font-weight: 600; }

.abd-import-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
    font-size: 13px;
}
.abd-import-options label { display: flex; align-items: center; gap: 6px; }

#abd-import-results { margin-top: 12px; }

/* ── Multi-Directory Dashboard ────────────────────────────── */

/* Directory list table */
.abd-dir-table th,
.abd-dir-table td { vertical-align: middle; padding: 10px 12px; }
.abd-dir-table code {
    font-size: 12px;
    background: #f0f0f0;
    padding: 3px 7px;
    border-radius: 3px;
    user-select: all;
}
.abd-dir-table code:hover { background: #e0e7ff; }

/* Type badge */
.abd-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Breadcrumb */
.abd-dir-breadcrumb {
    font-size: 14px;
    margin: 4px 0 16px;
    color: #555;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.abd-dir-breadcrumb a { color: #2271b1; text-decoration: none; }
.abd-dir-breadcrumb a:hover { text-decoration: underline; }
.abd-dir-breadcrumb strong { color: #1d2327; }

/* Tab navigation */
.abd-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}
.abd-tab-link {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-bottom: -2px;
    transition: color .15s, background .15s;
}
.abd-tab-link:hover { color: #1d2327; background: #f0f0f0; }
.abd-tab-link.abd-tab-active {
    color: #1d2327;
    background: #fff;
    border-color: #ddd;
    border-bottom-color: #fff;
    font-weight: 600;
}

/* Tab content wrapper */
.abd-tab-content-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0 6px 6px 6px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

/* ── Shared Page Intro ──────────────────────────────── */

.abd-page-intro { margin-bottom: 24px; }
.abd-page-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: #1d2327; }
.abd-page-subtitle { font-size: 14px; color: #6b7280; margin: 0; }

/* ── Documentation ──────────────────────────────────── */

.abd-docs-grid { display: flex; flex-direction: column; gap: 8px; }

.abd-docs-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.abd-docs-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    background: #f9fafb;
    transition: background .15s;
}
.abd-docs-section-header:hover { background: #f3f4f6; }
.abd-docs-section-header h2 {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #1d2327;
}
.abd-docs-icon { font-size: 18px; width: 26px; text-align: center; }
.abd-docs-chevron { font-size: 16px; color: #9ca3af; }

.abd-docs-body {
    padding: 18px 20px;
    display: none;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}
.abd-docs-body h4 { font-size: 14px; font-weight: 600; margin: 16px 0 8px; }
.abd-docs-body p  { margin: 0 0 10px; }
.abd-docs-body ul, .abd-docs-body ol { margin: 0 0 12px 20px; }
.abd-docs-body li { margin-bottom: 6px; }

.abd-docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 12px;
}
.abd-docs-table th,
.abd-docs-table td {
    text-align: left;
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
}
.abd-docs-table th { background: #f9fafb; font-weight: 600; color: #374151; }
.abd-docs-table tr:nth-child(even) td { background: #f9fafb; }

.abd-code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: monospace;
    font-size: 13px;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 8px 0 12px;
    line-height: 1.8;
}
.abd-docs-tip {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #1e40af;
    margin: 12px 0 0 !important;
}

/* ── Support ────────────────────────────────────────── */

.abd-support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.abd-support-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.abd-support-card-icon { font-size: 36px; margin-bottom: 10px; }
.abd-support-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.abd-support-card p  { font-size: 13px; color: #6b7280; margin: 0 0 16px; }
.abd-support-common { margin-top: 8px; }

/* ── + Add New menu item highlight ─────────────────── */
#adminmenu a[href*="abddir-add-new"] { color: #2563eb !important; font-weight: 600; }


/* ── Plugin Settings Page ─────────────────────────── */
.abd-settings-header { margin-bottom: 24px; }
.abd-settings-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.abd-settings-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}
.abd-settings-card-title .dashicons { color: #64748b; }
.abd-settings-card .form-table th { padding-top: 12px; }
