
/* ==========================================================================
   Onepath - Favorites
   /assets/css/favorites.css

   対象:
   - /tsushin/favorites/index.php
   ========================================================================== */


/* ==========================================================================
   TOKENS
   ========================================================================== */

.favorites-hero,
.favorites-section {
    --favorites-accent: #159ca5;
    --favorites-accent-dark: #0d7f87;
    --favorites-accent-soft: #eaf8f8;
    --favorites-purple-soft: #f5f1f7;
    --favorites-text: #222;
    --favorites-muted: #6f7478;
    --favorites-border: #e1e6e8;
    --favorites-bg: #f7f9fa;
    --favorites-white: #fff;
    --favorites-heart: #d94f68;
    --favorites-shadow: 0 18px 55px rgba(0, 0, 0, .07);
}


/* ==========================================================================
   HERO
   ========================================================================== */

.favorites-hero {
    position: relative;
    overflow: hidden;
    padding: 94px 0 74px;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(21, 156, 165, .11),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #f7fbfb 0%,
            #f8f5fa 100%
        );
}

.favorites-hero::after {
    content: "";
    position: absolute;
    right: -95px;
    bottom: -115px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(21, 156, 165, .12);
    border-radius: 50%;
}

.favorites-hero .container {
    position: relative;
    z-index: 1;
}

.favorites-en {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--favorites-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
}

.favorites-hero h1 {
    margin: 0;
    color: var(--favorites-text);
    font-size: clamp(38px, 5vw, 60px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.favorites-hero p {
    max-width: 620px;
    margin: 20px 0 0;
    color: var(--favorites-muted);
    font-size: 15px;
    line-height: 1.9;
}


/* ==========================================================================
   SECTION
   ========================================================================== */

.favorites-section {
    padding: 62px 0 96px;
    background: var(--favorites-bg);
}


/* ==========================================================================
   TOOLBAR
   ========================================================================== */

.favorites-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.favorites-count {
    color: var(--favorites-muted);
    font-size: 14px;
}

.favorites-count strong {
    margin-right: 4px;
    color: var(--favorites-text);
    font-size: 24px;
}

.favorites-clear {
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid #d7dee1;
    border-radius: 10px;
    background: #fff;
    color: #5b6266;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition:
        border-color .18s ease,
        background .18s ease,
        color .18s ease;
}

.favorites-clear:hover {
    border-color: #c5cfd3;
    background: #f1f4f5;
    color: var(--favorites-text);
}


/* ==========================================================================
   LOADING / EMPTY
   ========================================================================== */

.favorites-loading,
.favorites-empty {
    border: 1px solid var(--favorites-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--favorites-shadow);
}

.favorites-loading {
    padding: 32px;
    color: var(--favorites-muted);
    font-size: 14px;
    text-align: center;
}

.favorites-empty {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 28px;
    text-align: center;
}

.favorites-empty-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--favorites-accent-soft);
    color: var(--favorites-accent);
    font-size: 31px;
    line-height: 1;
}

.favorites-empty h2 {
    margin: 0;
    color: var(--favorites-text);
    font-size: 28px;
    line-height: 1.4;
}

.favorites-empty p {
    max-width: 560px;
    margin: 14px auto 0;
    color: var(--favorites-muted);
    font-size: 14px;
    line-height: 1.85;
}

.favorites-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 24px;
    padding: 12px 22px;
    border-radius: 11px;
    background: var(--favorites-accent);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition:
        background .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.favorites-search-btn:hover {
    background: var(--favorites-accent-dark);
    box-shadow: 0 10px 24px rgba(21, 156, 165, .18);
    transform: translateY(-1px);
}


/* ==========================================================================
   GRID
   ========================================================================== */

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}


/* ==========================================================================
   CARD
   ========================================================================== */

.favorite-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--favorites-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--favorites-shadow);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.favorite-card:hover {
    border-color: rgba(21, 156, 165, .3);
    box-shadow: 0 22px 54px rgba(0, 0, 0, .09);
    transform: translateY(-2px);
}

.favorite-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}


/* ==========================================================================
   IMAGE
   ========================================================================== */

.favorite-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(
            135deg,
            #eef3f4,
            #f5f3f6
        );
}

.favorite-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

.favorite-card:hover .favorite-card-image img {
    transform: scale(1.025);
}

.favorite-card-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #a2adb1;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .16em;
}

.favorite-card-type {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #434a4e;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}


/* ==========================================================================
   BODY
   ========================================================================== */

.favorite-card-body {
    padding: 22px 22px 24px;
}

.favorite-card-location {
    margin-bottom: 7px;
    color: var(--favorites-accent);
    font-size: 11px;
    font-weight: 800;
}

.favorite-card-school {
    margin: 0;
    color: var(--favorites-text);
    font-size: 23px;
    line-height: 1.45;
}

.favorite-card-campus {
    margin: 6px 0 0;
    color: #444b4f;
    font-size: 14px;
    font-weight: 700;
}

.favorite-card-copy {
    margin: 14px 0 0;
    color: #61686c;
    font-size: 13px;
    line-height: 1.75;
}


/* ==========================================================================
   META
   ========================================================================== */

.favorite-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.favorite-card-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #f2f6f7;
    color: #60686c;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

.favorite-card-meta strong {
    color: var(--favorites-text);
    font-size: 11px;
}


/* ==========================================================================
   DETAIL LINK
   ========================================================================== */

.favorite-card-detail {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    color: var(--favorites-accent);
    font-size: 12px;
    font-weight: 800;
}


/* ==========================================================================
   REMOVE
   ========================================================================== */

.favorite-remove {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 7px 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--favorites-heart);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .11);
    backdrop-filter: blur(8px);
    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}

.favorite-remove span {
    color: #51585c;
    font-size: 10px;
    font-weight: 800;
}

.favorite-remove:hover {
    background: #fff1f4;
    color: #be3651;
    transform: translateY(-1px);
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 900px) {

    .favorites-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 720px) {

    .favorites-hero {
        padding: 72px 0 58px;
    }

    .favorites-hero h1 {
        font-size: 38px;
    }

    .favorites-hero p {
        margin-top: 16px;
        font-size: 14px;
    }

    .favorites-section {
        padding: 48px 0 70px;
    }

    .favorites-toolbar {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 20px;
    }

    .favorites-clear {
        width: 100%;
    }

    .favorites-empty {
        padding: 42px 18px;
        border-radius: 16px;
    }

    .favorites-empty h2 {
        font-size: 24px;
    }

    .favorite-card {
        border-radius: 16px;
    }

    .favorite-card-body {
        padding: 20px 18px 22px;
    }

    .favorite-card-school {
        font-size: 21px;
    }

    .favorite-remove {
        top: 11px;
        right: 11px;
    }
}


/* ==========================================================================
   SMALL MOBILE
   ========================================================================== */

@media (max-width: 420px) {

    .favorites-hero h1 {
        font-size: 34px;
    }

    .favorites-count strong {
        font-size: 21px;
    }

    .favorite-card-meta {
        display: grid;
        grid-template-columns: 1fr;
    }

    .favorite-card-meta > span {
        width: fit-content;
    }

    .favorite-remove span {
        display: none;
    }

    .favorite-remove {
        width: 36px;
        padding: 7px;
        justify-content: center;
    }
}


/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.favorites-clear:focus-visible,
.favorites-search-btn:focus-visible,
.favorite-card-link:focus-visible,
.favorite-remove:focus-visible {
    outline: 3px solid rgba(21, 156, 165, .28);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .favorite-card,
    .favorite-card-image img,
    .favorites-search-btn,
    .favorite-remove {
        transition: none;
    }
}