/**
 * TemplinTech Preferred Source
 * Local stylesheet only. No external fonts, images, scripts or third-party resources.
 *
 * @copyright (C) 2026 Dr. Yordan Balabanov, representing TemplinTech
 * @license GNU General Public License version 2 or later
 */

.templintech-preferred-source {
    --tt-ps-border: rgba(0, 0, 0, 0.12);
    --tt-ps-bg: rgba(0, 0, 0, 0.025);
    --tt-ps-text: inherit;
    --tt-ps-muted: color-mix(in srgb, currentColor 67%, transparent);
    --tt-ps-button-bg: #202124;
    --tt-ps-button-text: #ffffff;
    margin: 1.25rem 0;
    color: var(--tt-ps-text);
}

.templintech-preferred-source__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.templintech-preferred-source__text,
.templintech-preferred-source__action {
    min-width: 0;
}

.templintech-preferred-source__text {
    display: grid;
    gap: 0.22rem;
}

.templintech-preferred-source__title,
.templintech-preferred-source__body,
.templintech-preferred-source__note {
    line-height: 1.45;
}

.templintech-preferred-source__title {
    font-size: 1rem;
    font-weight: 700;
}

.templintech-preferred-source__body {
    font-size: 0.94rem;
}

.templintech-preferred-source__action {
    display: grid;
    flex: 0 0 auto;
    justify-items: end;
    gap: 0.3rem;
}

.templintech-preferred-source__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.58rem 0.9rem;
    border: 1px solid var(--tt-ps-button-bg);
    border-radius: 0.45rem;
    background: var(--tt-ps-button-bg);
    color: var(--tt-ps-button-text) !important;
    font-size: 0.91rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none !important;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.templintech-preferred-source__button:hover,
.templintech-preferred-source__button:focus-visible {
    color: var(--tt-ps-button-text) !important;
    opacity: 0.88;
}

.templintech-preferred-source__button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.templintech-preferred-source__note {
    color: var(--tt-ps-muted);
    font-size: 0.75rem;
}

.templintech-preferred-source--compact .templintech-preferred-source__content {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--tt-ps-border);
    border-bottom: 1px solid var(--tt-ps-border);
}

.templintech-preferred-source--card .templintech-preferred-source__content {
    padding: 1rem 1.1rem;
    border: 1px solid var(--tt-ps-border);
    border-radius: 0.7rem;
    background: var(--tt-ps-bg);
}

.templintech-preferred-source--minimal {
    margin: 1rem 0;
}

.templintech-preferred-source--minimal .templintech-preferred-source__body,
.templintech-preferred-source--minimal .templintech-preferred-source__note {
    display: none;
}

.templintech-preferred-source--minimal .templintech-preferred-source__content {
    gap: 0.75rem 1rem;
}

@media (max-width: 700px) {
    .templintech-preferred-source__content {
        align-items: stretch;
        flex-direction: column;
    }

    .templintech-preferred-source__action {
        justify-items: stretch;
    }

    .templintech-preferred-source__button {
        width: 100%;
    }

    .templintech-preferred-source__note {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .templintech-preferred-source__button {
        transition: none;
    }
}
