/* My websites (Components/Pages/Websites/Websites.razor): the filter row and one card per website. The page frame and
   head are the shared app page ones (WebbuilderUI css/app-page.css). Skeleton: Components/Skeletons/Websites/WebsitesSkeleton.razor. */

/* The toolbar is the platform's glass toolbar as it is (WebbuilderUI css/app-toolbar.css): the filters, then the number
   of accounts at the end (app-toolbar-note) */

/* =========
     cards
   ========= */

/* A last row that is not full keeps its cards' width */
.wst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wst-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--app-line);
    border-radius: 22px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-soft);
    animation-delay: calc(var(--wst-i, 0) * 50ms + 80ms);
    transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.35s var(--app-ease-spring);
}

@media (hover: hover) {
    .wst-card:not(.wskel-card):hover {
        box-shadow: var(--app-shadow-hover);
        transform: translateY(-2px);
    }
}

.wst-card-warn {
    border-color: color-mix(in srgb, var(--app-warning) 45%, var(--app-line));
}

.wst-card-danger {
    border-color: color-mix(in srgb, var(--app-danger) 40%, var(--app-line));
}

/* The details link (app-link) takes the 13.5px from here; the avatar and the name keep their own sizes */
.wst-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-size: 13.5px;
}

.wst-avatar {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--app-gradient-brand);
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
}

.wst-card-name {
    min-width: 0;
}

.wst-name {
    margin: 0;
    overflow: hidden;
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--app-text-strong);
}

.wst-meta {
    margin: 2px 0 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--app-text-muted);
}

.wst-plan {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.wst-plan-text {
    font-size: 13.5px;
    color: var(--app-text);
}

.wst-hint {
    margin: -4px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--app-text-muted);
}

/* Actions at the foot of the card, whatever the card's height */
.wst-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

/* The details link (app-link) in the card's top corner */
.wst-details {
    flex: none;
    align-self: flex-start;
    margin-left: auto;
    white-space: nowrap;
}

/* =========
     cards
   ========= */


/* =================
     empty states
   ================= */

.wst-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 520px;
    margin: 32px auto 0;
    padding: 40px 28px;
    border: 1px dashed var(--app-line);
    border-radius: 24px;
    text-align: center;
}

.wst-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    border-radius: 18px;
    background: var(--app-accent-soft);
    font-size: 28px;
    color: var(--app-accent);
}

.wst-empty-title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 600;
    color: var(--app-text-strong);
}

.wst-empty-text {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--app-text-muted);
}

.wst-quiet {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    border: 1px dashed var(--app-line);
    border-radius: 16px;
    font-size: 14px;
    color: var(--app-text-muted);
}

.wst-quiet .bx {
    font-size: 18px;
    color: var(--app-accent);
}

/* =================
     empty states
   ================= */


/* ==============
     responsive
   ============== */

@media (max-width: 575.98px) {
    .wst-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .wst-card {
        padding: 18px 16px;
    }

    .wst-actions .app-btn {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wst-card {
        transition: none;
    }
}
