/**
 * ICDN Language Filter - Frontend CSS
 * Version: 2.1.0
 */

.icdn-filters-wrapper {
    max-width: 1200px;
    margin: 15px auto 25px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* =========================================
   CUSTOM FILTERS
   ========================================= */

.icdn-custom-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.icdn-cf-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.icdn-cf-items-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.icdn-cf-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

.icdn-cf-btn:hover {
    border-color: #1D70B3;
    box-shadow: 0 2px 8px rgba(29, 112, 179, 0.15);
}

.icdn-cf-btn.active {
    border-color: #1D70B3;
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(29, 112, 179, 0.2);
}

.icdn-cf-img {
    max-width: 120px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.icdn-cf-text {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    padding: 0 5px;
}

.icdn-cf-btn.active .icdn-cf-text {
    color: #1D70B3;
}

.icdn-cf-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: #fff;
    border: 2px solid #dc3545;
    border-radius: 50%;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icdn-cf-reset:hover {
    background: #dc3545;
    color: #fff;
}

/* =========================================
   LANGUAGE FILTER
   ========================================= */

.icdn-language-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.icdn-lf-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.icdn-lf-flags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.icdn-lf-flag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.icdn-lf-flag:hover {
    border-color: #1D70B3;
    background: #f0f7ff;
    color: #1D70B3;
}

.icdn-lf-flag.active {
    border-color: #1D70B3;
    background: #1D70B3;
    color: #fff;
}

.icdn-lf-flag svg.icdn-flag-svg {
    border-radius: 3px;
    flex-shrink: 0;
}

.icdn-lf-flag[data-lang="JAP"] svg.icdn-flag-svg,
.icdn-lf-flag[data-lang="KOR"] svg.icdn-flag-svg {
    border: 1px solid #ccc;
}

.icdn-lf-flag.active[data-lang="JAP"] svg.icdn-flag-svg,
.icdn-lf-flag.active[data-lang="KOR"] svg.icdn-flag-svg {
    border-color: rgba(255, 255, 255, 0.5);
}

.icdn-lf-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: #fff;
    border: 2px solid #dc3545;
    border-radius: 50%;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icdn-lf-clear:hover {
    background: #dc3545;
    color: #fff;
}

/* =========================================
   BADGES (shared)
   ========================================= */

.icdn-filter-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    border-radius: 4px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

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

@media (max-width: 768px) {
    .icdn-filters-wrapper {
        margin: 10px auto 20px auto;
        padding: 0 10px;
    }

    .icdn-cf-label,
    .icdn-lf-label {
        width: 100%;
        margin-bottom: 5px;
    }

    .icdn-cf-btn {
        padding: 5px 8px;
        min-height: 42px;
    }

    .icdn-cf-img {
        max-width: 80px;
        max-height: 28px;
    }

    .icdn-cf-text {
        font-size: 12px;
    }

    .icdn-lf-flag {
        padding: 5px 10px;
        font-size: 11px;
    }

    .icdn-lf-flag svg.icdn-flag-svg {
        width: 20px;
        height: 15px;
    }

    .icdn-filter-badge {
        top: -6px;
        right: -6px;
        font-size: 8px;
        padding: 2px 4px;
    }
}
