/*
 * Name Generator styles.
 * Modern, minimal, RTL-aware; uses theme palette variables.
 */

body.dota-counter-site .dc-ng {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 0 64px;
    color: var(--dc-text);
    font-family: var(--dc-font);
}

body.dota-counter-site .dc-ng a {
    color: inherit;
    text-decoration: none;
}

/* Layout */
body.dota-counter-site .dc-ng__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: start;
}

body.dota-counter-site .dc-ng__panel {
    padding: 22px;
    border: 1px solid var(--dc-line);
    border-radius: var(--dc-radius-large);
    background: var(--dc-panel);
}

body.dota-counter-site .dc-ng__panel-title {
    margin: 0 0 6px;
    color: var(--dc-text);
    font-size: 16px;
    font-weight: 800;
}

body.dota-counter-site .dc-ng__panel-hint {
    margin: 0 0 18px;
    color: var(--dc-muted);
    font-size: 13px;
    line-height: 1.7;
}

/* Style grid */
body.dota-counter-site .dc-ng__style-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

body.dota-counter-site .dc-ng__style {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--dc-line);
    border-radius: 12px;
    color: var(--dc-muted);
    background: var(--dc-panel-soft);
    cursor: pointer;
    text-align: right;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

body.dota-counter-site .dc-ng__style:hover {
    color: var(--dc-text);
    border-color: rgba(245, 249, 246, 0.18);
}

body.dota-counter-site .dc-ng__style.is-active {
    color: var(--dc-text);
    border-color: rgba(120, 239, 101, 0.4);
    background: var(--dc-panel);
}

body.dota-counter-site .dc-ng__style-icon {
    font-size: 18px;
    line-height: 1;
}

body.dota-counter-site .dc-ng__style-name {
    color: inherit;
    font-size: 13px;
    font-weight: 800;
}

body.dota-counter-site .dc-ng__style-hint {
    color: var(--dc-muted);
    font-size: 12px;
    line-height: 1.5;
}

body.dota-counter-site .dc-ng__style-sample {
    color: var(--dc-muted);
    font-size: 12px;
    font-style: italic;
    direction: ltr;
    text-align: left;
    align-self: stretch;
    margin-top: 2px;
}

body.dota-counter-site .dc-ng__style.is-active .dc-ng__style-sample {
    color: var(--dc-text);
}

/* Hero picker */
body.dota-counter-site .dc-ng__hero-picker {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
    border-top: 1px dashed var(--dc-line);
    border-bottom: 1px dashed var(--dc-line);
    margin: 4px 0 14px;
}

body.dota-counter-site .dc-ng__hero-picker[hidden] {
    display: none;
}

body.dota-counter-site .dc-ng__label {
    color: var(--dc-text);
    font-size: 13px;
    font-weight: 700;
}

body.dota-counter-site .dc-ng__hero-search {
    position: relative;
}

body.dota-counter-site .dc-ng__hero-search input {
    width: 100%;
    padding: 11px 42px;
    border: 1px solid var(--dc-line);
    border-radius: 10px;
    color: var(--dc-text);
    background: var(--dc-panel-soft);
    font: inherit;
    font-size: 13px;
    direction: rtl;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

body.dota-counter-site .dc-ng__hero-search input:focus {
    outline: none;
    border-color: rgba(120, 239, 101, 0.42);
    background: var(--dc-panel);
    box-shadow: 0 0 0 3px rgba(120, 239, 101, 0.07);
}

body.dota-counter-site .dc-ng__hero-search-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 14px;
    width: 18px;
    height: 18px;
    color: var(--dc-muted);
    pointer-events: none;
    transform: translateY(-50%);
}

body.dota-counter-site .dc-ng__hero-search.is-open .dc-ng__hero-search-icon {
    color: var(--dc-green);
}

body.dota-counter-site .dc-ng__hero-clear {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 10px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--dc-muted);
    background: transparent;
    font: inherit;
    font-size: 20px;
    cursor: pointer;
    transform: translateY(-50%);
}

body.dota-counter-site .dc-ng__hero-clear[hidden],
body.dota-counter-site .dc-ng__hero-menu[hidden],
body.dota-counter-site .dc-ng__hero-option[hidden],
body.dota-counter-site .dc-ng__hero-no-result[hidden] {
    display: none !important;
}

body.dota-counter-site .dc-ng__hero-clear:hover {
    color: var(--dc-text);
}

body.dota-counter-site .dc-ng__hero-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    max-height: 310px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(245, 249, 246, 0.18);
    border-radius: 14px;
    background: #101216;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
    scrollbar-width: thin;
    scrollbar-color: var(--dc-line) transparent;
}

body.dota-counter-site .dc-ng__hero-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

body.dota-counter-site .dc-ng__hero-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 7px;
    border: 0;
    border-radius: 9px;
    color: var(--dc-muted);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    direction: ltr;
    text-align: left;
    cursor: pointer;
    transition: color 0.16s, background 0.16s;
}

body.dota-counter-site .dc-ng__hero-option:hover,
body.dota-counter-site .dc-ng__hero-option:focus-visible {
    outline: none;
    color: var(--dc-text);
    background: var(--dc-panel-soft);
}

body.dota-counter-site .dc-ng__hero-option img,
body.dota-counter-site .dc-ng__hero-option-fallback {
    width: 44px;
    height: 25px;
    flex: 0 0 auto;
    border-radius: 6px;
    object-fit: cover;
    background: var(--dc-panel-soft);
}

body.dota-counter-site .dc-ng__hero-option-fallback {
    display: grid;
    place-items: center;
}

body.dota-counter-site .dc-ng__hero-option span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dota-counter-site .dc-ng__hero-no-result {
    margin: 0;
    padding: 24px 12px;
    color: var(--dc-muted);
    font-size: 12px;
    text-align: center;
}

body.dota-counter-site .dc-ng__hint {
    color: var(--dc-muted);
    font-size: 12px;
    line-height: 1.6;
}

/* Generate button */
body.dota-counter-site .dc-ng__actions {
    margin-top: 4px;
}

body.dota-counter-site .dc-ng__generate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    padding: 11px 20px;
    border: 0;
    border-radius: 12px;
    background: var(--dc-text);
    color: var(--dc-shell);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.2s;
}

body.dota-counter-site .dc-ng__generate:hover {
    opacity: 0.9;
}

body.dota-counter-site .dc-ng__generate svg {
    width: 18px;
    height: 18px;
    color: currentColor;
}

body.dota-counter-site .dc-ng__generate.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Results */
body.dota-counter-site .dc-ng__results {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 100px;
}

body.dota-counter-site .dc-ng__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 60px 16px;
    border: 1px dashed var(--dc-line);
    border-radius: 14px;
    color: var(--dc-muted);
    text-align: center;
}

body.dota-counter-site .dc-ng__empty-icon {
    font-size: 30px;
    line-height: 1;
}

body.dota-counter-site .dc-ng__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

body.dota-counter-site .dc-ng__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--dc-line);
    border-radius: 12px;
    color: var(--dc-text);
    background: var(--dc-panel-soft);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

body.dota-counter-site .dc-ng__card:hover {
    color: var(--dc-text);
    border-color: rgba(245, 249, 246, 0.18);
    background: var(--dc-panel);
}

body.dota-counter-site .dc-ng__card-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
}

body.dota-counter-site .dc-ng__card-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--dc-muted);
}

body.dota-counter-site .dc-ng__card-copy,
body.dota-counter-site .dc-ng__card-star {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

body.dota-counter-site .dc-ng__card-copy svg,
body.dota-counter-site .dc-ng__card-star svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

body.dota-counter-site .dc-ng__card:hover .dc-ng__card-copy {
    color: var(--dc-text);
    background: var(--dc-panel);
}

body.dota-counter-site .dc-ng__card-star {
    color: var(--dc-muted);
}

body.dota-counter-site .dc-ng__card-star:hover {
    color: var(--dc-orange);
    background: rgba(244, 168, 71, 0.1);
}

body.dota-counter-site .dc-ng__card.is-fav .dc-ng__card-star {
    color: var(--dc-orange);
}

body.dota-counter-site .dc-ng__card.is-fav .dc-ng__card-star svg {
    fill: var(--dc-orange);
}

/* Favorites */
body.dota-counter-site .dc-ng__favorites {
    margin-top: 18px;
    padding: 18px 22px;
    border: 1px solid var(--dc-line);
    border-radius: var(--dc-radius-large);
    background: var(--dc-panel);
}

body.dota-counter-site .dc-ng__favorites[hidden] {
    display: none;
}

body.dota-counter-site .dc-ng__favorites-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

body.dota-counter-site .dc-ng__favorites-head h2 {
    margin: 0;
    color: var(--dc-text);
    font-size: 15px;
    font-weight: 800;
}

body.dota-counter-site .dc-ng__favorites-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--dc-panel-soft);
    color: var(--dc-muted);
    font-size: 12px;
    font-weight: 700;
}

body.dota-counter-site .dc-ng__favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
}

body.dota-counter-site .dc-ng__fav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--dc-line);
    border-radius: 10px;
    background: var(--dc-panel-soft);
    color: var(--dc-text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

body.dota-counter-site .dc-ng__fav:hover {
    border-color: rgba(245, 249, 246, 0.18);
    background: var(--dc-panel);
}

body.dota-counter-site .dc-ng__fav-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
}

body.dota-counter-site .dc-ng__fav-copy,
body.dota-counter-site .dc-ng__fav-remove {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: var(--dc-muted);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
}

body.dota-counter-site .dc-ng__fav-copy svg,
body.dota-counter-site .dc-ng__fav-remove svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

body.dota-counter-site .dc-ng__fav-copy:hover {
    color: var(--dc-text);
    background: var(--dc-panel);
}

body.dota-counter-site .dc-ng__fav-remove:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

body.dota-counter-site .dc-ng__favorites-hint {
    margin: 10px 0 0;
    color: var(--dc-muted);
    font-size: 12px;
    line-height: 1.6;
}

/* About + FAQ (reuses similar styles) */
body.dota-counter-site .dc-ng__about,
body.dota-counter-site .dc-ng__faq {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid var(--dc-line);
    border-radius: var(--dc-radius-large);
    background: var(--dc-panel);
}

body.dota-counter-site .dc-ng__about h2,
body.dota-counter-site .dc-ng__faq-title {
    margin: 0 0 12px;
    color: var(--dc-text);
    font-size: 18px;
    font-weight: 800;
}

body.dota-counter-site .dc-ng__about p {
    margin: 0 0 10px;
    color: var(--dc-muted);
    font-size: 13px;
    line-height: 1.9;
}

body.dota-counter-site .dc-ng__about p:last-child {
    margin-bottom: 0;
}

body.dota-counter-site .dc-ng__about a {
    color: var(--dc-green);
    text-decoration: underline;
    text-decoration-color: rgba(120, 239, 101, 0.35);
    text-underline-offset: 4px;
}

body.dota-counter-site .dc-ng__about a:hover {
    text-decoration-color: currentColor;
}

body.dota-counter-site .dc-ng__faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.dota-counter-site .dc-ng__faq-item {
    border: 1px solid var(--dc-line);
    border-radius: 12px;
    background: var(--dc-panel-soft);
    transition: border-color 0.2s;
}

body.dota-counter-site .dc-ng__faq-item[open] {
    border-color: rgba(245, 249, 246, 0.18);
}

body.dota-counter-site .dc-ng__faq-item summary {
    padding: 14px 16px;
    color: var(--dc-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.dota-counter-site .dc-ng__faq-item summary::-webkit-details-marker {
    display: none;
}

body.dota-counter-site .dc-ng__faq-item summary::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--dc-line);
    border-radius: 6px;
    color: var(--dc-muted);
    font-size: 14px;
    line-height: 1;
    transition: transform 0.2s, color 0.2s, border-color 0.2s;
}

body.dota-counter-site .dc-ng__faq-item[open] summary::after {
    content: "−";
    color: var(--dc-text);
    border-color: rgba(245, 249, 246, 0.25);
}

body.dota-counter-site .dc-ng__faq-item p {
    margin: 0;
    padding: 0 16px 14px;
    color: var(--dc-muted);
    font-size: 13px;
    line-height: 1.9;
}

/* Toast */
body.dota-counter-site .dc-ng__toast {
    position: fixed;
    z-index: 60;
    bottom: 32px;
    left: 50%;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 18px;
    border: 1px solid rgba(120, 239, 101, 0.45);
    border-radius: 999px;
    background: rgba(16, 23, 31, 0.92);
    backdrop-filter: blur(8px);
    color: #f5f9f6;
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

body.dota-counter-site .dc-ng__toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

body.dota-counter-site .dc-ng__toast svg {
    width: 16px;
    height: 16px;
    color: var(--dc-green);
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 880px) {
    body.dota-counter-site .dc-ng__layout {
        grid-template-columns: 1fr;
    }
    body.dota-counter-site .dc-ng__style-grid {
        grid-template-columns: 1fr;
    }
    body.dota-counter-site .dc-ng__cards {
        grid-template-columns: 1fr;
    }
    body.dota-counter-site .dc-ng__results {
        position: static;
    }
}

@media (max-width: 540px) {
    body.dota-counter-site .dc-ng {
        padding: 18px 0 48px;
    }
    body.dota-counter-site .dc-ng__panel,
    body.dota-counter-site .dc-ng__about,
    body.dota-counter-site .dc-ng__faq,
    body.dota-counter-site .dc-ng__favorites {
        padding: 16px;
    }
    body.dota-counter-site .dc-ng__favorites-list {
        grid-template-columns: 1fr;
    }
    body.dota-counter-site .dc-ng__hero-options {
        grid-template-columns: 1fr;
    }
}
