
/******************************************************************************/
/*  SAOIF TOOLS HELPER CASCADING STYLE SHEET ASSETS                           */
/*----------------------------------------------------------------------------*/
/*  Copyright (C) 2020 MINEVERSAL                                             */
/*  Licensed material of MINEVERSAL                                           */
/*----------------------------------------------------------------------------*/
/*  Object              : SAOIF-TH-CSSA (CASCADING STYLE SHEET ASSETS)        */
/*  Outline             : SAOIF-TH-CSSA (CASCADING STYLE SHEET ASSETS)        */
/*  File ID             : SAOIF-TH-CSSA-1                                     */
/*----------------------------------------------------------------------------*/
/*  Author              : Joe                                                 */
/*  Revision Author     : -                                                   */
/*  Created Time        : 2025/08/01 10:00 (UTC+07:00)                        */
/*  Modification Time   : 2025/08/01 10:00 (UTC+07:00)                        */
/*  Version             : 1 (Number of Version)                               */
/*  Revision            : 0 (Number of Revision)                              */
/******************************************************************************/

/******************************************************************************/
/*  FILTER PANEL                                                              */
/*  Card-like container that holds all search rows.                           */
/******************************************************************************/
.filter-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 16px 20px 10px;
    margin: 14px 70px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    box-sizing: border-box;
    width: auto;
}

/* ── Generic filter row ──────────────────────────────────────────────────── */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;           /* children same height */
    justify-content: flex-start;    /* start-aligned; flex-grow fills the rest */
    gap: 8px;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.filter-row:last-child {
    margin-bottom: 0;
}

/* ── Row 1: primary (Mode + Search + Type) ───────────────────────────────── */
.filter-row--primary {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

/* ── Row 2/3: secondary filter dropdowns ────────────────────────────────── */
.filter-row--secondary {
    padding: 6px 0 4px;
    border-bottom: 1px dashed #efefef;
}

.filter-row--secondary:last-of-type,
.filter-row--total {
    border-bottom: none;
}

/* ── Uniform select styling inside filter panel ──────────────────────────── */
/*    flex: 1 1 0  → every select grows equally to fill the row              */
.filter-panel select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 28px 8px 12px;
    height: 38px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 13px;
    background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 9px center;
    cursor: pointer;
    color: #333;
    /* ── fill-to-panel: equal growth, no hard min/max ── */
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-panel select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

/* ── Search input wrapper ────────────────────────────────────────────────── */
/*    flex: 2 1 0  → takes double the width of a single select               */
.search-input-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 2 1 0;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

.search-input-wrap #search-bar, .search-input-wrap #fodder-search {
    width: 100%;
    padding: 8px 34px 8px 14px;
    height: 38px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-wrap #search-bar:focus, .search-input-wrap #fodder-search:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

/* ── Copy-link button inside search bar ─────────────────────────────────── */
.copy-link-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease;
    line-height: 0;
}

.copy-link-btn:hover  { color: #1a73e8; }
.copy-link-btn:active { transform: translateY(-50%) scale(0.88); }

/* ── Total skill row ─────────────────────────────────────────────────────── */
.filter-row--total {
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
    justify-content: center !important;       /* centre the label + badge */
}

.total-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
}

.total-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1a73e8;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 20px;
    min-width: 38px;
    line-height: 1.5;
}

/******************************************************************************/
/*  ACTIONS PANEL                                                             */
/*  My Skills mode: Save · Upload · Reset buttons + GDrive box               */
/******************************************************************************/
.actions-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    margin-inline: 70px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    box-sizing: border-box;
}

/* ── Three action buttons in a row — all equal width ──────────────────────  */
.actions-btn-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: stretch;
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* Each button fills its equal share */
.actions-btn-row .btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}

/* Upload button: hide raw file input, show label as the button face */
.actions-upload-btn input[type="file"] {
    display: none;
}

.actions-upload-btn label {
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: center;
}

/* ── GDrive box — full width below buttons ─────────────────────────────── */
.gdrive-box {
    margin-top: 0;
    padding: 14px;
    border: 1px solid #dde3ee;
    background: #f5f8ff;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
}

.gdrive-label {
    font-weight: 600;
    font-size: 13px;
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.gdrive-row {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
}

#GDriveInput {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 7px;
    border: 1px solid #ccc;
    font-size: 13px;
    height: 38px;
    box-sizing: border-box;
}

.gdrive-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 7px;
    border: none;
    background: #1a73e8;
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    height: 38px;
    transition: background 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}

.gdrive-btn:hover { background: #1558b0; }

.gdrive-result {
    margin-top: 10px;
    font-size: 0.92em;
    word-break: break-all;
}

/******************************************************************************/
/*  MY-SETS FILTER PANEL (choose-set dropdown)                                */
/******************************************************************************/
.filter-panel--sets {
    /* inherits .filter-panel; select inside gets full-width treatment */
    padding: 12px 20px;
    margin-bottom: 0;
}

.filter-panel--sets .filter-row {
    margin-bottom: 0;
}

/* The single skillSets dropdown fills the entire row */
.filter-panel--sets select {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    height: 40px;
    font-size: 14px;
}

/******************************************************************************/
/*  RESPONSIVE — tablet (600–899 px)                                          */
/******************************************************************************/
@media (min-width: 600px) {
    .filter-panel {
        margin: 14px 20px 20px;
    }

    .actions-panel {
        margin-inline: 20px;
    }
}

/******************************************************************************/
/*  RESPONSIVE — desktop (900–1199 px)                                        */
/******************************************************************************/
@media (min-width: 900px) {
    .filter-panel {
        margin: 14px 50px 20px;
    }

    .actions-panel {
        margin-inline: 50px;
    }
}

/******************************************************************************/
/*  RESPONSIVE — large desktop (1200 px+)                                     */
/******************************************************************************/
@media (min-width: 1200px) {
    .filter-panel {
        margin: 14px 70px 20px;
    }

    .actions-panel {
        margin-inline: 70px;
    }
}

/******************************************************************************/
/*  RESPONSIVE — mobile (≤599 px)                                             */
/*  Every row item stacks full-width; justify applies vertically              */
/******************************************************************************/
@media (max-width: 599px) {

    /* ── Filter panel ── */
    .filter-panel {
        margin: 14px 0 20px;
        padding: 12px 14px 8px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    /* Selects and search bar → full width */
    .filter-panel select,
    .search-input-wrap {
        flex: none;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* ── Actions panel ── */
    .actions-panel {
        margin-inline: 0;
        padding: 12px 14px;
    }

    /* Buttons stack vertically, each full width */
    .actions-btn-row {
        flex-direction: column;
        align-items: stretch;
    }

    .actions-btn-row .btn {
        flex: none;
        width: 100%;
        max-width: 100%;
    }

    /* GDrive row: input on top, button below */
    .gdrive-row {
        flex-wrap: wrap;
    }

    #GDriveInput {
        flex: 1 1 100%;
        width: 100%;
    }

    .gdrive-btn {
        flex: 1 1 100%;
        width: 100%;
    }

    /* My-sets panel */
    .filter-panel--sets {
        margin: 14px 0 0;
    }
}

/******************************************************************************/
/*  HELPERS                                                                   */
/******************************************************************************/

/* dropdown-skill / dropdown-ability / actions stay hidden until JS shows them */
.dropdown-skill,
.dropdown-ability,
.actions {
    display: none;
}

.informationList {
    margin-top: 20px;
}

.class_skill {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.text-center {
    text-align: center;
}

/******************************************************************************/
/*  SKILL CARD GRID                                                           */
/******************************************************************************/
.gacha-list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.gachaList {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 100%;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
    border-radius: 15px;
    background-color: #fffff8;
    border: #ccc solid 1px;
    height: 100%;
    min-height: 320px;
}

.maxGachaList { max-width: 100%; }

@media (min-width: 600px) {
    .gachaList    { flex: 1 1 30%; }
    .maxGachaList { max-width: 30%; }
}

@media (min-width: 900px) {
    .gachaList    { flex: 1 1 20%; }
    .maxGachaList { max-width: 17%; }
}

.alignC {
    display: inline-block;
    width: 100%;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
    color: #333;
    flex-grow: 1;
}

.gachaList a {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.gachaList a:hover    { text-decoration: none; }
.gachaList img {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    width: 100%;
    height: auto;
}

/* ── Card image wrapper ─────────────────────────────────────────────────── */
.card-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    line-height: 0;
}

.card-wrap .card-img {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    width: 100%;
    height: auto;
    display: block;
}

/* ── Top-left / top-right icon containers ───────────────────────────────── */
.card-tl, .card-tr {
    position: absolute;
    z-index: 3;
    display: flex;
    gap: 5px;
}
.card-tl { top: 8px; left: 8px; }
.card-tr { top: 8px; right: 8px; }

.card-tl img, .card-tr img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    background: rgba(40, 40, 40, 0.72);
    backdrop-filter: blur(2px);
    border-radius: 10px;
    padding: 5px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .12);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55));
}

/* ── Star rating ─────────────────────────────────────────────────────────── */
.card-stars {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 2px;
    z-index: 3;
    white-space: nowrap;
    background: rgba(35, 35, 35, 0.72);
    backdrop-filter: blur(2px);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.card-stars span {
    font-size: 18px;
    line-height: 1;
    color: #FFD700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 4px rgba(0, 0, 0, .5);
}

/* ── Card labels & buttons ──────────────────────────────────────────────── */
.gacha_name {
    font-weight: bold;
    font-size: 1.1em;
    margin: 8px 10px 0;
}

.gacha_duration {
    font-size: 1em;
    color: black;
    margin-top: 4px;
}

.skill_btn {
    border-style: none;
    margin-bottom: 0;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    overflow: hidden;
    background-color: #f66;
    text-align: center;
}

/* ── Skill-type color badges ─────────────────────────────────────────────── */
.skill, .ability, .burst, .link, .chain, .full_burst,
.accele, .connect, .mod, .awakening, .normal {
    color: #fff;
    margin: 5px;
}

.skill      { background: #9160d4; }
.ability    { background: #6da7e6; }
.link       { background: #50F450; }
.chain      { background: #3BCCFF; }
.full_burst { background: #E4007F; }
.burst      { background: #E50031; }
.accele     { background: #2f0080; }
.connect    { background: darkorange; }
.mod        { background: #00A000; }
.awakening  { background: #515151; }
.normal     { background: lightblue; }
.ring       { background: #e4b600; }

/* campaign / maintenance used in "all" mode */
.campaign    { background: #9160d4; color: #fff; margin: 5px; }
.maintenance { background: #6da7e6; color: #fff; margin: 5px; }

/* ── Skill set buttons ──────────────────────────────────────────────────── */
.skillSet_btn {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.skillSet_btn a {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.skillSet_btn .ringBtn {
    color: #fff;
    text-shadow: 0 0 5px rgba(17, 17, 17, 0.5);
    box-shadow: 0 1px 5px rgba(117, 117, 117, 0.3) inset;
    background: linear-gradient(to bottom, #ffdc50 0%, #e4b600 100%);
}

/******************************************************************************/
/*  MY SKILL SET GRID                                                         */
/******************************************************************************/
.card-grid {
    gap: 16px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 0 5%;
    justify-content: center;
}

#skill-set-view { margin-top: 20px; }

@media (max-width: 767px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "s1  s2"
            "s6  s7"
            "s3  s4"
            "s8  s9"
            "s5  s10";
        gap: 16px;
        padding: 0 0;
    }

    .card-grid .s1  { grid-area: s1;  }
    .card-grid .s2  { grid-area: s2;  }
    .card-grid .s3  { grid-area: s3;  }
    .card-grid .s4  { grid-area: s4;  }
    .card-grid .s5  { grid-area: s5;  }
    .card-grid .s6  { grid-area: s6;  }
    .card-grid .s7  { grid-area: s7;  }
    .card-grid .s8  { grid-area: s8;  }
    .card-grid .s9  { grid-area: s9;  }
    .card-grid .s10 { grid-area: s10; }
}

.gachaList.empty-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 180px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 10px;
    background-color: #fafafa;
}

/******************************************************************************/
/*  CLASS_BUTTON legacy (kept for backward compat)                            */
/******************************************************************************/
.class_button {
    display: flex;
    flex-wrap: wrap;
}

/******** END OF FILE *********************************************************/