/**
 * Tool Card
 *
 * Enterprise visual treatment for the compact Tool summary component.
 */

.tnt-tool-card {
    --tnt-card-navy: #0B1D33;
    --tnt-card-navy-hover: #142A45;
    --tnt-card-gold: #F5B300;
    --tnt-card-gold-soft: #FFF6DC;
    --tnt-card-surface: #FFFFFF;
    --tnt-card-surface-subtle: #F8FAFC;
    --tnt-card-surface-hover: #F1F5F9;
    --tnt-card-border: #E6E9EF;
    --tnt-card-text: #0B1D33;
    --tnt-card-text-muted: #64748B;

    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    width: 100%;
    padding: 1.5rem;

    background: var(--tnt-card-surface);
    border: 1px solid var(--tnt-card-border);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(11, 29, 51, 0.06);

    color: var(--tnt-card-text);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.tnt-tool-card:hover {
    border-color: rgba(11, 29, 51, 0.18);
    box-shadow: 0 8px 28px rgba(11, 29, 51, 0.09);
}

.tnt-tool-card__header {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}

.tnt-tool-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;

    border: 1px solid var(--tnt-card-border);
    border-radius: 12px;
    background: var(--tnt-card-surface-subtle);

    overflow: hidden;
}

.tnt-tool-card__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tnt-tool-card__identity {
    min-width: 0;
}

.tnt-tool-card__title {
    margin: 0;

    color: var(--tnt-card-text);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
}

.tnt-tool-card__title a {
    color: inherit;
    text-decoration: none;
}

.tnt-tool-card__title a:hover,
.tnt-tool-card__title a:focus-visible {
    color: var(--tnt-card-navy-hover);
}

.tnt-tool-card__tagline {
    margin: 0.35rem 0 0;

    color: var(--tnt-card-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.tnt-tool-card__signals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tnt-tool-card__signal {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;

    min-height: 32px;
    padding: 0.35rem 0.7rem;

    background: var(--tnt-card-surface-subtle);
    border: 1px solid var(--tnt-card-border);
    border-radius: 999px;

    color: var(--tnt-card-text);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
}

.tnt-tool-card__signal--rating {
    background: var(--tnt-card-gold-soft);
    border-color: rgba(245, 179, 0, 0.32);
    color: var(--tnt-card-text);
}

.tnt-tool-card__signal--rating::before {
    content: "★";
    color: var(--tnt-card-gold);
    font-size: 0.85rem;
    line-height: 1;
}

.tnt-tool-card__features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1.25rem;

    margin: 0;
    padding: 1rem 0;

    border-top: 1px solid var(--tnt-card-border);
    border-bottom: 1px solid var(--tnt-card-border);

    list-style: none;
}

.tnt-tool-card__features li {
    position: relative;

    margin: 0;
    padding-left: 1.45rem;

    color: var(--tnt-card-text);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
}

.tnt-tool-card__features li::before {
    content: "✓";

    position: absolute;
    top: 0;
    left: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 1rem;
    height: 1rem;

    border-radius: 50%;
    background: var(--tnt-card-navy);

    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

.tnt-tool-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;

    margin-top: auto;
}

.tnt-tool-card__actions .tnt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 0.75rem 1.1rem;

    border: 1px solid transparent;
    border-radius: 10px;

    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.tnt-tool-card__actions .tnt-btn-primary {
    background: var(--tnt-card-navy);
    border-color: var(--tnt-card-navy);
    color: #FFFFFF;
}

.tnt-tool-card__actions .tnt-btn-primary:hover,
.tnt-tool-card__actions .tnt-btn-primary:focus-visible {
    background: var(--tnt-card-navy-hover);
    border-color: var(--tnt-card-navy-hover);
    color: #FFFFFF;
}

.tnt-tool-card__actions .tnt-btn-secondary {
    background: var(--tnt-card-surface-subtle);
    border-color: var(--tnt-card-border);
    color: var(--tnt-card-navy);
}

.tnt-tool-card__actions .tnt-btn-secondary:hover,
.tnt-tool-card__actions .tnt-btn-secondary:focus-visible {
    background: var(--tnt-card-surface-hover);
    border-color: var(--tnt-card-navy);
    color: var(--tnt-card-navy);
}

.tnt-tool-card__actions .tnt-btn:focus-visible {
    outline: 3px solid rgba(245, 179, 0, 0.35);
    outline-offset: 2px;
}

.tnt-tool-card__actions .tnt-btn:active {
    transform: translateY(1px);
}

.tnt-tool-card__actions .is-disabled {
    background: #E5E7EB;
    border-color: #E5E7EB;
    color: #94A3B8;

    pointer-events: none;
    cursor: not-allowed;
}

@media (max-width: 768px) {

    .tnt-tool-card {
        padding: 1.25rem;
    }

    .tnt-tool-card__features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {

    .tnt-tool-card {
        gap: 1rem;
        padding: 1rem;
    }

    .tnt-tool-card__header {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 0.8rem;
    }

    .tnt-tool-card__logo {
        width: 52px;
        height: 52px;
        border-radius: 10px;
    }

    .tnt-tool-card__title {
        font-size: 1.05rem;
    }

    .tnt-tool-card__tagline {
        font-size: 0.88rem;
    }

    .tnt-tool-card__actions {
        grid-template-columns: 1fr;
    }

    .tnt-tool-card__actions .tnt-btn {
        width: 100%;
    }
}