/* ═══════════════════════════════════════════════
   Translation Locations – Public Styles
   ═══════════════════════════════════════════════ */

/* ── CSS Custom Properties (primary color injected inline) ── */
:root {
    --tl-primary: #2ecc71;
    --tl-primary-light: #d5f5e3;
    --tl-primary-dark: #27ae60;
}

/* ── Wrapper ── */
.tl-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

/* ── Search Bar ── */
.tl-search-wrap {
    margin-bottom: 28px;
}
.tl-search-inner {
    position: relative;
    max-width: 100%;
}
.tl-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}
.tl-search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 1px solid #dde1e6;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}
.tl-search-input::placeholder {
    color: #aaa;
}
.tl-search-input:focus {
    border-color: var(--tl-primary);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}

/* ── Tabs ── */
.tl-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 28px;
}
.tl-tab {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #f0f2f5;
    color: #444;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.tl-tab:hover {
    background: #e4e7eb;
}
.tl-tab.active {
    background: var(--tl-primary);
    color: #fff;
}
.tl-tab.active:hover {
    background: var(--tl-primary-dark);
}

/* ── Card Grid ── */
.tl-grid {
    display: grid;
    gap: 20px;
}
.tl-grid-2 { grid-template-columns: repeat(2, 1fr); }
.tl-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tl-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card ── */
.tl-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid #eef0f3;
}
.tl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}
a.tl-card:hover {
    color: inherit;
}

/* ── Card Header ── */
.tl-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.tl-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tl-primary-light);
    border-radius: 10px;
    padding: 8px;
    color: var(--tl-primary);
}
.tl-card-icon svg {
    width: 26px;
    height: 26px;
}
.tl-card-title-wrap {
    flex: 1;
    min-width: 0;
}
.tl-card-title {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}
.tl-card-region {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}
.tl-card-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}
.tl-card:hover .tl-card-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* ── Card Description ── */
.tl-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* ── Card Tags ── */
.tl-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.tl-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--tl-primary-light);
    color: var(--tl-primary-dark);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}
.tl-tag:hover {
    background: var(--tl-primary);
    color: #fff;
}

/* ── Hidden / filtered cards ── */
.tl-card.tl-hidden {
    display: none !important;
}

/* ── No results ── */
.tl-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 15px;
}
.tl-wrapper .tl-no-results {
    display: none;
}
.tl-wrapper .tl-no-results.tl-visible {
    display: block;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .tl-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .tl-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .tl-wrapper {
        padding: 16px 12px;
    }
    .tl-grid-2,
    .tl-grid-3,
    .tl-grid-4 { grid-template-columns: 1fr; }

    .tl-tabs {
        gap: 4px;
    }
    .tl-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
    .tl-card {
        padding: 18px;
    }
    .tl-card-title {
        font-size: 16px;
    }
}
