/* ==========================================================================
   File: Resource/vector/vector.css
   KHALA STUDIO — VECTOR RESOURCE MODULE
   ========================================================================== */

/* --------------------------------------------------------------------------
   Top bar — back button + title (50px from top)
   -------------------------------------------------------------------------- */
.vec-top-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 50px 0 20px;
}

/* --------------------------------------------------------------------------
   Sticky Search Container & Shell
   -------------------------------------------------------------------------- */
.vec-search-sticky-bar {
    position: sticky;
    top: 0 !important;
    z-index: 1000;
    background-color: var(--hub-bg) !important;
    padding: 6px 0 16px 0;
    margin-bottom: 8px;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, opacity 0.25s ease, visibility 0.25s ease;
}

.vec-search-sticky-bar.nav-hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.vec-search-sticky-bar.is-stuck {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.vec-search-shell {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 0 20px;
    background: var(--hub-soft);
    border-radius: 32px;
    transition: background-color .18s ease;
}

.vec-search-shell:focus-within {
    background: var(--hub-soft-hover);
}

.vec-search-shell .material-symbols-outlined {
    font-size: 22px;
    color: var(--hub-text);
    flex: 0 0 auto;
}

.vec-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--hub-title);
    font: inherit;
    font-size: 1.125rem;
}

.vec-search-input::placeholder {
    color: #a9a9b3;
    opacity: 1;
}

.vec-search-submit {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--hub-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}

.vec-search-submit:hover {
    color: var(--hub-accent);
    background: var(--hub-soft-hover);
}

.vec-search-submit .material-symbols-outlined {
    font-size: 24px;
}

/* --------------------------------------------------------------------------
   View 1: Category Packs Grid (Cover Cards)
   -------------------------------------------------------------------------- */
.vec-packs-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hub-gap);
    width: 100%;
    opacity: 0;
    animation: pureFadeIn 0.28s ease forwards;
}

.vec-pack-card {
    min-width: 0;
    aspect-ratio: 1.275 / 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: var(--hub-soft) !important;
    border-radius: var(--hub-radius) !important;
    border: 0;
    cursor: pointer;
    text-align: center;
    transition: background-color .18s ease;
}

.vec-pack-card:focus-visible {
    outline: 2px solid var(--hub-accent);
    outline-offset: 3px;
}

.vec-pack-thumb {
    width: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--hub-soft);
}

.vec-pack-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
    opacity: 0;
    transition: opacity .18s ease;
    pointer-events: none;
}

.vec-pack-card:hover .vec-pack-thumb::after {
    opacity: 1;
}

.vec-pack-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.vec-pack-label {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    background: var(--hub-soft);
    color: var(--hub-title) !important;
    font-size: 1rem !important;
    line-height: 1.15;
    font-weight: 500 !important;
    letter-spacing: -0.01em;
}

.vec-pack-count {
    font-size: 1rem !important;
    color: var(--hub-text);
    font-weight: 400 !important;
}

/* --------------------------------------------------------------------------
   View 2: Masonry Grid & Clean Download Button
   -------------------------------------------------------------------------- */
.vec-grid-viewport {
    position: relative;
    width: 100%;
    min-height: 400px;
}

.vec-loading-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hub-bg);
    z-index: 10;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    pointer-events: none;
}

.vec-loading-mask.hidden {
    opacity: 0;
    visibility: hidden;
}

.vec-grid {
    display: flex;
    gap: var(--hub-gap);
    width: 100%;
    align-items: flex-start;
    opacity: 0;
    animation: pureFadeIn 0.28s ease forwards;
}

.vec-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--hub-gap);
    min-width: 0;
}

.vec-card {
    position: relative;
    width: 100%;
    border-radius: var(--hub-radius) !important;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--hub-soft);
    background-image: 
        linear-gradient(45deg, var(--hub-border) 25%, transparent 25%), 
        linear-gradient(-45deg, var(--hub-border) 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, var(--hub-border) 75%), 
        linear-gradient(-45deg, transparent 75%, var(--hub-border) 75%);
    background-size: 16px 16px;
}

.vec-card img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* Download Button: Glass Blur without hover color change */
.vec-download-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.121);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .18s ease;
    cursor: pointer;
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.vec-download-btn span {
    font-size: 20px !important;
    color: #ffffff;
}

.vec-card:hover .vec-download-btn,
.vec-card:focus-within .vec-download-btn {
    opacity: 1;
}

.vec-empty {
    width: 100%;
    text-align: center;
    font-size: 1.125rem !important;
    color: var(--hub-text);
    padding: 60px 0;
    line-height: 1.5;
    background: var(--hub-soft);
    border-radius: var(--hub-radius);
}

@keyframes pureFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
    .vec-packs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .vec-top-bar {
        margin-top: 48px;
    }

    .vec-search-sticky-bar {
        padding: 4px 0 12px 0;
    }

    .vec-search-shell {
        height: 48px;
        padding: 0 6px 0 16px;
    }

    .vec-search-submit {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
    }

    .vec-packs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vec-pack-label {
        min-height: 46px;
        padding: 11px 12px;
    }

    .vec-download-btn {
        width: 30px;
        height: 30px;
        opacity: 0.9;
    }

    .vec-download-btn span {
        font-size: 16px !important;
    }
}