/* SAH Card Catalog Styles */

.sah-cc-search-form,
.sah-cc-editor-form {
    background: #f9f9f9;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.sah-cc-search-form p,
.sah-cc-editor-form p {
    margin-bottom: 15px;
}

.sah-cc-search-form input[type="text"],
.sah-cc-editor-form input[type="text"],
.sah-cc-search-form select,
.sah-cc-editor-form select,
.sah-cc-editor-form textarea {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.sah-cc-search-form button,
.sah-cc-editor-form button {
    background: #0057b8;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.sah-cc-search-form button:hover,
.sah-cc-editor-form button:hover {
    background: #003f86;
}

.sah-cc-issue-list {
    list-style: none;
    padding-left: 0;
}

.sah-cc-issue-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.sah-cc-issue-list a {
    color: #0057b8;
    text-decoration: none;
}

.sah-cc-issue-list a:hover {
    text-decoration: underline;
}

table.widefat {
    margin-top: 20px;
}

table.widefat th {
    background: #f1f1f1;
    font-weight: bold;
}

table.widefat td,
table.widefat th {
    padding: 10px;
}

.updated {
    background: #e0ffe0;
    border-left: 4px solid #46b450;
    padding: 10px;
    margin-bottom: 20px;
}

/* Page title (replaces app shell bubble heading) */
.sah-cc-page-title {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-weight: 600;
    color: #1f2328;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.sah-cc-nav ul li {
    margin: 6px 0;
}

.sah-cc-nav a {
    color: #0057b8;
    text-decoration: none;
}

.sah-cc-nav a:hover {
    text-decoration: underline;
}

.sah-cc-btn {
    display: inline-block;
    background: #0057b8;
    color: #fff !important;
    padding: 8px 14px;
    margin-right: 8px;
    border-radius: 4px;
    text-decoration: none;
}

.sah-cc-btn:hover {
    background: #003f86;
}

.sah-cc-entry p {
    font-size: 16px;
    margin-bottom: 20px;
}

.sah-cc-autocomplete-box {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    width: 400px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
}

.sah-cc-autocomplete-item {
    padding: 6px 10px;
    cursor: pointer;
}

.sah-cc-autocomplete-item:hover {
    background: #f1f1f1;
}

.sah-cc-family-tree ul {
    list-style: none;
    padding-left: 20px;
}

.sah-cc-family-tree li {
    margin: 6px 0;
}

.sah-cc-tree-dates {
    color: #666;
    font-size: 12px;
    margin-left: 6px;
}

/* ------------------------------
   GLOBAL LAYOUT
------------------------------ */

/* ------------------------------
   INPUTS
------------------------------ */

.sah-cc-section input[type="text"],
.sah-cc-section input[type="number"],
.sah-cc-section select,
.sah-cc-section textarea {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 4px;
    font-size: 14px;
}

.sah-cc-section textarea {
    height: 120px;
}

/* ------------------------------
   BUTTONS
------------------------------ */

.sah-cc-section button,
.sah-cc-btn {
    background: #0073aa;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.sah-cc-section button:hover,
.sah-cc-btn:hover {
    background: #005f8d;
}

/* ------------------------------
   NAVIGATION
------------------------------ */

.sah-cc-nav {
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    margin-bottom: 20px;
}

.sah-cc-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.sah-cc-nav a {
    text-decoration: none;
    color: #0073aa;
    font-weight: 500;
}

.sah-cc-nav a:hover {
    color: #005f8d;
}

/* ------------------------------
   RESULTS LIST
------------------------------ */

.sah-cc-results ul {
    list-style: none;
    padding-left: 0;
}

.sah-cc-results li {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ------------------------------
   FAMILY TREE
------------------------------ */

.sah-cc-family-tree ul {
    list-style: none;
    padding-left: 20px;
}

.sah-cc-family-tree li {
    margin: 8px 0;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
}

.sah-cc-tree-dates {
    color: #777;
    font-size: 12px;
    margin-left: 6px;
}

/* ------------------------------
   AUTOCOMPLETE
------------------------------ */

.sah-cc-autocomplete-box {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    width: 400px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.sah-cc-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
}

.sah-cc-autocomplete-item:hover {
    background: #f1f1f1;
}

/* ------------------------------
   APP SHELL
------------------------------ */

.sah-cc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sah-cc-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.sah-cc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.sah-cc-card-title {
    font-size: 16px;
    font-weight: 600;
}

/* ------------------------------
   CONTENT AREA (inside app shell)
------------------------------ */

.sah-cc-content {
    margin-top: 16px;
}

/* ------------------------------
   TWO-COLUMN FORM LAYOUT
------------------------------ */

.sah-cc-form {
    max-width: 640px;
    margin-top: 16px;
}

.sah-cc-form-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.sah-cc-form-row > label:first-child {
    flex: 0 0 180px;
    font-weight: 600;
    font-size: 13px;
    padding-top: 8px;
    color: #374151;
    text-align: right;
}

.sah-cc-form-row > input[type="text"],
.sah-cc-form-row > select,
.sah-cc-form-row > textarea {
    flex: 1 1 auto;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    background: #fff;
    min-width: 0;
}

.sah-cc-form-row > textarea {
    resize: vertical;
}

.sah-cc-form-row > button {
    margin-top: 0;
}

/* ------------------------------
   HOLDINGS MATRIX TABLE
------------------------------ */

.sah-cc-content .widefat {
    width: 100%;
    table-layout: auto;
    overflow-x: auto;
    display: block;
    border-collapse: collapse;
    font-size: 13px;
}

.sah-cc-content .widefat thead th {
    font-size: 11px;
}

/* ------------------------------
   BREADCRUMB
------------------------------ */

.sah-cc-breadcrumb {
    font-size: 13px;
    color: #57606a;
    margin: 0 0 16px 0;
}

.sah-cc-breadcrumb a {
    color: #3b82d4;
    text-decoration: none;
}

.sah-cc-breadcrumb a:hover {
    text-decoration: underline;
}

/* ------------------------------
   SMALL INLINE BUTTON
------------------------------ */

.sah-cc-btn-sm {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    background: #f0f6ff;
    color: #3b82d4;
    border: 1px solid #c3d9f7;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

.sah-cc-btn-sm:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

/* ------------------------------
   EXPORT LIST
------------------------------ */

.sah-cc-export-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.sah-cc-export-list li {
    margin: 0;
    padding: 0;
}
