/* =========================================================================
   Cancels & Type Modern Archival Exhibition Pages
   ========================================================================= */

.cancels-page,
.type-page {
    max-width: 1680px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.cancels-header-card,
.type-header-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 243, 232, 0.95) 100%);
    border: 1px solid rgba(141, 116, 64, 0.28);
    border-radius: 18px;
    padding: 24px 28px 22px;
    margin-bottom: 24px;
    box-shadow: 0 10px 24px rgba(36, 29, 17, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
}

.cancels-header-card::before,
.type-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #b8860b 50%, transparent 100%);
    border-radius: 2px;
}

.cancels-header-badges,
.type-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.cancels-header-badge,
.type-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #5c4320;
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid rgba(184, 134, 11, 0.25);
    border-radius: 20px;
}

/* --- CANCELS TIMELINE GRID & CARDS --- */
.cancels-timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.cancel-card {
    background: #ffffff;
    border: 1px solid rgba(141, 116, 64, 0.22);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(45, 35, 20, 0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
    position: relative;
}

.cancel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(45, 35, 20, 0.12);
    border-color: rgba(184, 134, 11, 0.45);
}

.cancel-card-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 12px;
    gap: 8px;
}

.cancel-year-pill {
    font-size: 0.88rem;
    font-weight: 700;
    color: #2b1f13;
    background: #f4ecdf;
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(141, 116, 64, 0.2);
}

.cancel-scan-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    background: linear-gradient(180deg, #faf7f2 0%, #f4ede2 100%);
    border: 1px solid rgba(141, 116, 64, 0.16);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 14px;
    overflow: hidden;
    cursor: default;
    user-select: none;
}

.cancel-card-image {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
    pointer-events: none;
}

.cancel-card-body {
    flex: 1 1 auto;
    margin-bottom: 12px;
}

.cancel-card-text {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #3e3223;
    margin: 0;
}

.cancel-card-text b {
    color: #1a1208;
    font-weight: 700;
}

.cancel-card-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed rgba(141, 116, 64, 0.2);
}

.cancel-btn-era,
#layoutBodyContent a.cancel-btn-era,
#layoutBodyContent a.cancel-btn-era:link,
#layoutBodyContent a.cancel-btn-era:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #7a5416 !important;
    background: #fbf5ea;
    border: 1px solid rgba(184, 134, 11, 0.35);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cancel-btn-era svg {
    stroke: currentColor;
    flex-shrink: 0;
}

.cancel-btn-era:hover,
#layoutBodyContent a.cancel-btn-era:hover,
#layoutBodyContent a.cancel-btn-era:active {
    background: #7a5416;
    color: #ffffff !important;
    border-color: #7a5416;
    text-decoration: none;
}

/* --- TYPE MUSEUM CATALOG GRID & CARDS --- */
.type-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    align-items: stretch;
}

.type-shape-card {
    background: #ffffff;
    border: 1px solid rgba(141, 116, 64, 0.22);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(45, 35, 20, 0.05);
    padding: 18px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.type-shape-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(45, 35, 20, 0.12);
    border-color: rgba(184, 134, 11, 0.45);
}

.type-shape-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.type-shape-badge {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8b6b23;
    background: #fbf5ea;
    border: 1px solid rgba(184, 134, 11, 0.3);
    padding: 3px 10px;
    border-radius: 6px;
}

.type-shape-title {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2b1f13;
    margin: 4px 0 12px 0;
    line-height: 1.3;
}

.type-scan-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    background: linear-gradient(180deg, #faf7f2 0%, #f4ede2 100%);
    border: 1px solid rgba(141, 116, 64, 0.16);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
    overflow: hidden;
    cursor: default;
    user-select: none;
}

.type-shape-image {
    max-width: 100%;
    max-height: 145px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
    pointer-events: none;
}

.type-shape-body {
    flex: 1 1 auto;
    margin-bottom: 14px;
}

.type-shape-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #4a3e2f;
    margin: 0;
}

.type-shape-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(141, 116, 64, 0.15);
}

.type-btn-search,
#layoutBodyContent a.type-btn-search,
#layoutBodyContent a.type-btn-search:link,
#layoutBodyContent a.type-btn-search:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff !important;
    background: linear-gradient(180deg, #8b6b23 0%, #6f5417 100%);
    border: 1px solid #5a4310;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(111, 84, 23, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.type-btn-search span,
#layoutBodyContent a.type-btn-search span {
    color: #ffffff !important;
}

.type-btn-search svg {
    stroke: #ffffff;
    flex-shrink: 0;
}

.type-btn-search:hover,
#layoutBodyContent a.type-btn-search:hover,
#layoutBodyContent a.type-btn-search:active {
    background: linear-gradient(180deg, #9c7828 0%, #7d601a 100%);
    box-shadow: 0 4px 12px rgba(111, 84, 23, 0.35);
    color: #ffffff !important;
    text-decoration: none;
}

.type-btn-search:hover span,
#layoutBodyContent a.type-btn-search:hover span {
    color: #ffffff !important;
}

/* Responsive adjustments for Cancels and Type */
@media (max-width: 768px) {
    .cancels-timeline-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .type-cards-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .cancels-header-card,
    .type-header-card {
        padding: 18px 18px 16px;
    }
}

/* Screenshot Preview Popup & Modal Card */
#screenshot {
	position: fixed;
	border: 1px solid rgba(141, 116, 64, 0.32);
	background: #ffffff;
	border-radius: 14px;
	padding: 14px 16px;
	display: none;
	color: #2c241d;
	z-index: 99999;
	pointer-events: auto;
	max-width: 380px;
	width: auto;
	box-shadow: 0 16px 40px rgba(36, 29, 17, 0.22);
	transform: translateZ(0);
	box-sizing: border-box;
}

.screenshot-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(141, 116, 64, 0.18);
}

.screenshot-title {
	font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
	font-size: 1.05rem;
	font-weight: 700;
	color: #2b1f13;
}

.screenshot-type-badge {
	font-size: 0.75rem;
	font-weight: 700;
	color: #8b6b23;
	background: #fbf5ea;
	border: 1px solid rgba(184, 134, 11, 0.3);
	padding: 2px 8px;
	border-radius: 6px;
	letter-spacing: 0.04em;
}

.screenshot-close-btn {
	background: transparent;
	border: none;
	font-size: 22px;
	line-height: 1;
	color: #8b6b23;
	cursor: pointer;
	padding: 0 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-left: auto;
	transition: color 0.15s ease;
}

.screenshot-close-btn:hover {
	color: #a82424;
}

.screenshot-img-box {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, #faf7f2 0%, #f4ede2 100%);
	border: 1px solid rgba(141, 116, 64, 0.16);
	border-radius: 8px;
	padding: 10px;
	min-height: 90px;
}

#screenshot img {
	max-width: 100%;
	height: auto;
	display: block;
}

img.screenshot2 {
	max-width: 280px;
	max-height: 220px;
	object-fit: contain;
}

