/**
 * flugbuchen.de — Schnellziele Page Styles
 *
 * Category tiles, selection bar, result cards, skeleton loading.
 * Mobile-first, WCAG 2.1 AA compliant.
 *
 * @copyright reDim GmbH | @link https://www.redim.de | @contact team@redim.de
 */

/* ========================================
   Breadcrumb
   ======================================== */

.breadcrumb {
    padding: 1rem 0 0;
}

.breadcrumb__list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
}

.breadcrumb__list li + li::before {
    content: "/";
    margin-right: 0.5rem;
    color: var(--color-border);
}

.breadcrumb__list a {
    color: var(--color-text-secondary);
}

.breadcrumb__list a:hover {
    color: var(--color-secondary);
}

.breadcrumb__list [aria-current="page"] {
    color: var(--color-text);
    font-weight: 500;
}

/* ========================================
   Hero
   ======================================== */

.sz-hero {
    padding: 2.5rem 0 2rem;
    text-align: center;
}

.sz-hero__inner {
    max-width: 48rem;
    margin: 0 auto;
}

.sz-hero__title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.sz-hero__title-accent {
    display: block;
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.sz-hero__text {
    font-size: 1.0625rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

@media (min-width: 768px) {
    .sz-hero {
        padding: 3.5rem 0 2.5rem;
    }
    .sz-hero__title {
        font-size: 2.5rem;
    }
    .sz-hero__title-accent {
        font-size: 1.25rem;
    }
}

/* ========================================
   Category Groups
   ======================================== */

.sz-categories {
    padding-bottom: 2rem;
}

.sz-group {
    margin-bottom: 2.5rem;
}

.sz-group__title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1.25rem;
}

.sz-group__line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* ========================================
   Category Tiles Grid
   ======================================== */

.sz-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .sz-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .sz-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }
}

/* ========================================
   Category Tile
   ======================================== */

.sz-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    aspect-ratio: 16 / 10;
    min-height: 8rem;
    text-align: left;
    padding: 0;
    background: none;
    color: inherit;
}

.sz-tile:hover {
    box-shadow: var(--shadow-md);
}

.sz-tile:hover .sz-tile__overlay {
    opacity: 0.35;
}

.sz-tile[aria-pressed="true"] {
    border-color: var(--color-secondary);
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.sz-tile[aria-pressed="true"] .sz-tile__check {
    opacity: 1;
    transform: scale(1);
}

.sz-tile__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    font-size: 0.6875rem;
}

.sz-tile__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.75) 0%,
        rgba(15, 23, 42, 0.15) 60%,
        rgba(15, 23, 42, 0.05) 100%
    );
    transition: opacity 0.2s ease;
    z-index: 1;
}

.sz-tile__content {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.sz-tile__label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.sz-tile__claim {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
    display: none;
}

@media (min-width: 768px) {
    .sz-tile__claim {
        display: block;
    }
    .sz-tile__label {
        font-size: 1rem;
    }
}

.sz-tile__check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 3;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sz-tile__check svg {
    width: 1rem;
    height: 1rem;
}

/* ========================================
   Sticky Selection Bar
   ======================================== */

.sz-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--color-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 0.75rem 0;
}

.sz-bar[hidden] {
    display: block;
    transform: translateY(100%);
    pointer-events: none;
}

.sz-bar.is-visible {
    transform: translateY(0);
    pointer-events: auto;
}

.sz-bar__inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

@media (min-width: 768px) {
    .sz-bar__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.sz-bar__left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.sz-bar__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.sz-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(13, 148, 136, 0.1);
    color: var(--color-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.sz-chip:hover {
    background: rgba(13, 148, 136, 0.2);
}

.sz-chip__remove {
    display: inline-flex;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
}

.sz-bar__count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.sz-bar__right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.sz-bar__reset {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.sz-bar__reset:hover {
    color: var(--color-error);
}

.sz-bar__submit {
    white-space: nowrap;
}

/* ========================================
   Results Section
   ======================================== */

.sz-results {
    padding: 3rem 0;
    background: var(--color-bg-alt);
}

.sz-results .section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.sz-results__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .sz-results__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .sz-results__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sz-results__actions {
    text-align: center;
    margin-top: 2rem;
}

/* ========================================
   Result Card
   ======================================== */

.sz-card {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sz-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.sz-card__image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.sz-card__image .image-placeholder {
    width: 100%;
    height: 100%;
    font-size: 0.6875rem;
}

.sz-card__body {
    padding: 1rem;
}

.sz-card__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.125rem;
}

.sz-card__country {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.sz-card__description {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sz-card__score {
    margin-bottom: 0.75rem;
}

.sz-card__score-bar {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.375rem;
}

.sz-card__score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.sz-card__score-fill--high {
    background: var(--color-success);
}

.sz-card__score-fill--medium {
    background: var(--color-secondary);
}

.sz-card__score-fill--low {
    background: var(--color-warning);
}

.sz-card__score-label {
    font-size: 0.8125rem;
    font-weight: 600;
}

.sz-card__score-label--high {
    color: var(--color-success);
}

.sz-card__score-label--medium {
    color: var(--color-secondary);
}

.sz-card__score-label--low {
    color: var(--color-warning);
}

.sz-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.sz-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.sz-card__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-price);
}

.sz-card__link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sz-card__link::after {
    content: "\2192";
}

.sz-card__link:hover {
    gap: 0.5rem;
}

/* ========================================
   Skeleton Loading
   ======================================== */

@keyframes sz-skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.sz-skeleton {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sz-skeleton__image {
    aspect-ratio: 16 / 10;
    background: var(--color-border);
    animation: sz-skeleton-pulse 1.5s ease-in-out infinite;
}

.sz-skeleton__body {
    padding: 1rem;
}

.sz-skeleton__line {
    height: 0.875rem;
    background: var(--color-border);
    border-radius: 4px;
    margin-bottom: 0.625rem;
    animation: sz-skeleton-pulse 1.5s ease-in-out infinite;
}

.sz-skeleton__line--short {
    width: 60%;
}

.sz-skeleton__line--medium {
    width: 80%;
}

.sz-skeleton__line--full {
    width: 100%;
}

.sz-skeleton__line--price {
    width: 40%;
    height: 1.125rem;
    margin-top: 0.5rem;
}

/* ========================================
   Empty & Error States
   ======================================== */

.sz-empty {
    text-align: center;
    padding: 3rem 1rem;
    grid-column: 1 / -1;
}

.sz-empty__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.sz-empty__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.sz-empty__text {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    max-width: 28rem;
    margin: 0 auto;
    line-height: 1.5;
}

.sz-empty__text a {
    font-weight: 600;
}

/* ========================================
   Cross-Link CTA
   ======================================== */

.sz-cta {
    padding: 3rem 0 4rem;
}

.sz-cta__card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 40rem;
    margin: 0 auto;
}

.sz-cta__title {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
}

.sz-cta__text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ========================================
   Price Skeleton (AJAX lazy load)
   ======================================== */

@keyframes price-skeleton-sweep {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes price-fade-in {
    to { opacity: 1; }
}

.price-skeleton {
    display: inline-block;
    vertical-align: middle;
}

.price-skeleton__loader {
    display: inline-block;
    width: 60px;
    height: 1.2em;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: price-skeleton-sweep 1.5s ease-in-out infinite;
    border-radius: 4px;
    vertical-align: middle;
}

.price-loaded {
    color: #16A34A;
    font-weight: 600;
    opacity: 0;
    animation: price-fade-in 0.3s ease forwards;
}

/* ========================================
   Body padding for sticky bar
   ======================================== */

body.sz-bar-active {
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    body.sz-bar-active {
        padding-bottom: 4rem;
    }
}
