/* ============================================================
   SearchIssues.css
   Album view: title group headers + issue cards
   Add to your site CSS bundle or link from AAMasterPage.master
   ============================================================ */

/* ----------------------------------------------------------
   Page-level search header
   ---------------------------------------------------------- */
.search-results-header {
    margin: 0.75em 0 1.25em 0;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #1a3a5c;
}

.search-results-header h1 {
    margin: 0;
    font-size: 2em;
    color: #1a3a5c;
}

.search-results-meta {
    margin-top: 0.25em;
    font-size: 1em;
    color: #666;
}

/* ----------------------------------------------------------
   Pagination bar  (top and bottom)
   ---------------------------------------------------------- */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0;
    margin: 0.5em 0 1em 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    font-size: 0.9em;
    color: #444;
}

.search-pagination a {
    display: inline-block;
    padding: 0.3em 0.85em;
    background: #1a3a5c;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    transition: background 0.15s;
}

.search-pagination a:hover {
    background: #2a5a8c;
}

.search-pagination .pagination-info {
    font-size: 0.9em;
    color: #555;
}

.pagination-jump {
    font-size: 0.9em;
    color: #555;
}

.pagination-jump-input {
    padding: 0.2em 0.4em;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-size: 1em;
    text-align: center;
    vertical-align: middle;
}

.pagination-jump button {
    padding: 0.2em 0.7em;
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 0.95em;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s;
}

.pagination-jump button:hover {
    background: #2a5a8c;
}

/* ----------------------------------------------------------
   Title group block
   ---------------------------------------------------------- */
.title-group {
    margin-bottom: 2.5em;
}

.title-group-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5em 1em;
    padding: 0.6em 0.75em;
    margin-bottom: 1em;
    background: #1a3a5c;
    border-left: 5px solid #c8a400;
    border-radius: 0 3px 3px 0;
    color: #fff;
}

.title-group-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1.2;
}

.title-group-header h2 a {
    color: #fff;
    text-decoration: none;
}

.title-group-header h2 a:hover {
    color: #ffd84d;
    text-decoration: underline;
}

.title-group-publisher {
    font-size: 1em;
    color: #b8cfe0;
    display: flex;
    align-items: center;
    gap: 0.4em;
    white-space: nowrap;
}

.title-group-publisher img {
    width: 16px;
    height: 11px;
    vertical-align: middle;
    border: 1px solid rgba(255,255,255,0.3);
}

.title-group-count {
    margin-left: auto;
    font-size: 0.95em;
    color: #b8cfe0;
    white-space: nowrap;
}

/* ----------------------------------------------------------
   Issue card grid — 6 col desktop, 4 tablet, 2 mobile
   ---------------------------------------------------------- */
.issue-card-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1em;
    list-style: none;
    margin: 0;
    padding: 0 0 0 5px; /* Match the 5px gold left border on the title group header */
}

@media (max-width: 1100px) {
    .issue-card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 700px) {
    .issue-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ----------------------------------------------------------
   Individual issue card — image flush top, info below
   ---------------------------------------------------------- */
.issue-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #d0d8e4;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.issue-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #1a3a5c;
}

/* Cover — flush top/right/bottom, small left padding to match card border */
.issue-card-cover {
    display: block;
    background: none;
    padding: 0 0 0 4px;
    line-height: 0;
}

.issue-card-cover a {
    display: block;
    line-height: 0;
}

.issue-card-cover img {
    width: 100%;
    height: auto;
    display: block;
}

/* Info section */
.issue-card-info {
    flex: 1;
    padding: 0.5em 0.6em 0.6em;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    min-width: 0;
}

.issue-card-number {
    font-size: 1em;
    font-weight: bold;
    line-height: 1.3;
    color: #1a3a5c;
    /* Allow up to 2 lines; JS middle-truncation handles overflow */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.issue-card-number a {
    color: inherit;
    text-decoration: none;
}

.issue-card-number a:hover {
    text-decoration: underline;
    color: #2a5a8c;
}

.issue-card-description {
    font-size: 0.82em;
    color: #555;
    line-height: 1.35;
    /* Allow up to 3 lines then truncate with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.issue-card-date {
    font-size: 0.88em;
    color: #666;
}

.issue-card-copies {
    margin-top: auto;
    font-size: 0.88em;
    padding-top: 0.35em;
    border-top: 1px solid #eee;
}

.issue-card-copies a {
    color: #1a3a5c;
    font-weight: bold;
    text-decoration: none;
}

.issue-card-copies a:hover {
    text-decoration: underline;
}

.issue-card-copies .no-copies {
    color: #999;
    font-style: italic;
}

.issue-card-copies .price {
    font-size: 1.2em;
    font-weight: bold;
    color: #0066c0;  /* Amazon-style mid-light blue */
}

/* In-stock cards get no special border styling */

/* ----------------------------------------------------------
   Empty / error states
   ---------------------------------------------------------- */
.search-no-results {
    padding: 2em;
    text-align: center;
    color: #666;
    font-size: 1em;
    border: 1px dashed #ccc;
    border-radius: 4px;
    margin: 1em 0;
}

.search-error {
    padding: 1em 1.25em;
    background: #fff3f3;
    border: 1px solid #f5c0c0;
    border-radius: 4px;
    color: #a00;
    margin: 1em 0;
}