/* Shared CSS for every number-system + currency + timezone converter. */

.ns, .cv, .tz {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
}
.ub-tool-layout:has(.ns), .ub-tool-layout:has(.cv), .ub-tool-layout:has(.tz) { display: block; }

.ns__pair, .cv__pair, .tz__pair {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: stretch;
}
.ns__col, .cv__col, .tz__col { display: flex; flex-direction: column; gap: 6px; }
.ns__label, .cv__label, .tz__label {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-tertiary);
}
.ns__input, .cv__input, .tz__input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 600;
    transition: border-color var(--transition);
}
.ns__input:focus, .cv__input:focus, .tz__input:focus { outline: none; border-color: var(--accent); }
.ns__arrow, .cv__arrow, .tz__arrow {
    align-self: center;
    color: var(--accent);
    font-size: 1.6rem;
    user-select: none;
    cursor: pointer;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
}
.ns__arrow:hover, .cv__arrow:hover, .tz__arrow:hover { background: var(--accent-muted); }

.ns__copy, .cv__copy, .tz__copy {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    padding: 5px 12px;
    font-size: 0.76rem;
    cursor: pointer;
    transition: all var(--transition);
    align-self: flex-start;
}
.ns__copy:hover, .cv__copy:hover, .tz__copy:hover { border-color: var(--accent); color: var(--accent); }
.is-copied { color: #7be0a5 !important; border-color: rgba(61,220,132,0.4) !important; }

.cv__rate, .tz__info {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: var(--text-secondary);
    text-align: center;
}
.cv__rate strong, .tz__info strong { color: var(--accent); }
.cv__source { font-size: 0.7rem; color: var(--text-tertiary); margin-left: 8px; }

.cv__loading { color: var(--text-tertiary); font-style: italic; }
.cv__error   { color: #f08080; }

.ns__related, .cv__related, .tz__related {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ns__related-label, .cv__related-label, .tz__related-label {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-tertiary); align-self: center; margin-right: 4px;
}
.ns__related-link, .cv__related-link, .tz__related-link {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.76rem;
    text-decoration: none;
    transition: all var(--transition);
}
.ns__related-link:hover, .cv__related-link:hover, .tz__related-link:hover {
    border-color: var(--accent); color: var(--accent); background: var(--accent-muted);
}

@media (max-width: 600px) {
    .ns__pair, .cv__pair, .tz__pair { grid-template-columns: 1fr; }
    .ns__arrow, .cv__arrow, .tz__arrow { transform: rotate(90deg); margin: 4px auto; }
}
