/* variables.css komt binnen via de tamrank-variables-late dependency (zie register_common_styles). */

/* ========================================
   LICENSE PAGE — Activation (Free Users)
   ======================================== */

/* Hidden submenu (null parent) → body class = admin_page_tam-rank-license
   which doesn't match the global [class*="tam-rank_page_"] selector */
.admin_page_tam-rank-license #wpcontent {
    background: var(--tr-color-base);
    font-family: var(--tr-font-family);
}

.tr-license {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 150px);
    padding: var(--tr-space-10) var(--tr-space-6);
}

.tr-license__card {
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-xl);
    padding: var(--tr-space-12) var(--tr-space-10);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--tr-shadow-lg);
}

/* ── Header ──────────────────────────────────────────────── */

.tr-license__header {
    text-align: center;
    margin-bottom: var(--tr-space-8);
}

.tr-license__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--tr-space-6);
}

.tr-license__logo img {
    width: 48px;
    height: 48px;
}

.tr-license__wordmark {
    font-size: var(--tr-text-2xl);
    font-weight: var(--tr-font-bold);
    color: var(--tr-color-slate-800);
    letter-spacing: -0.02em;
    margin-left: var(--tr-space-3);
}

.tr-license__wordmark span {
    color: var(--tr-color-primary);
}

.tr-license__title {
    font-size: var(--tr-text-xl);
    font-weight: var(--tr-font-bold);
    color: var(--tr-color-slate-900);
    margin: 0 0 var(--tr-space-2) 0;
    letter-spacing: -0.02em;
}

.tr-license__tagline {
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-500);
    margin: 0;
    line-height: var(--tr-leading-relaxed);
}

/* ── Form ────────────────────────────────────────────────── */

.tr-license__form {
    margin-bottom: var(--tr-space-6);
}

/* Label — same style as .tam-form-label (dashboard modal) */
.tr-license__label {
    display: block;
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-bold);
    color: var(--tr-color-slate-800);
    margin-bottom: var(--tr-space-2);
}

/* Input — same style as .tam-form-input (dashboard modal)
   !important needed to override WP admin forms.css */
.tr-license__input {
    width: 100% !important;
    padding: 13px var(--tr-space-4) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: var(--tr-radius-lg) !important;
    font-size: 14px !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace !important;
    letter-spacing: 0.5px;
    color: var(--tr-color-slate-800) !important;
    background: var(--tr-color-white) !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color var(--tr-transition-fast), box-shadow var(--tr-transition-fast);
    box-sizing: border-box;
    line-height: var(--tr-leading-normal);
}

.tr-license__input:focus {
    border-color: var(--tr-color-primary) !important;
    box-shadow: var(--tr-shadow-focus) !important;
}

.tr-license__input.has-error {
    border-color: var(--tr-color-error) !important;
    box-shadow: var(--tr-shadow-error) !important;
}

.tr-license__hint {
    display: block;
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-400);
    margin-top: var(--tr-space-2);
}

/* Submit button — extends .tr-btn--primary --lg, full-width */
.tr-license__submit {
    width: 100%;
    margin-top: var(--tr-space-4);
}

/* ── Messages ────────────────────────────────────────────── */

.tr-license__message {
    margin-top: var(--tr-space-4);
}

.tr-license__message--success {
    padding: var(--tr-space-4);
    background: var(--tr-color-success-bg);
    border-radius: var(--tr-radius-md);
}

.tr-license__success-item {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    color: #047857;
    font-size: var(--tr-text-sm);
    margin-bottom: var(--tr-space-1);
}

.tr-license__success-item:last-of-type {
    margin-bottom: 0;
}

.tr-license__success-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tr-license__success-redirect {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    margin-top: var(--tr-space-3);
    padding-top: var(--tr-space-3);
    border-top: 1px solid var(--tr-color-primary-light);
}

.tr-license__message--error {
    padding: var(--tr-space-4);
    background: var(--tr-color-error-bg);
    border-radius: var(--tr-radius-md);
    color: #b91c1c;
    font-size: var(--tr-text-sm);
}

.tr-license__error-title {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    font-weight: var(--tr-font-semibold);
    line-height: var(--tr-leading-normal);
}

.tr-license__error-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: #b91c1c;
}

.tr-license__error-hint {
    margin-top: var(--tr-space-2);
    font-size: var(--tr-text-xs);
    color: #991b1b;
    line-height: var(--tr-leading-relaxed);
    opacity: 0.85;
}

/* ── Help toggle ─────────────────────────────────────────── */

.tr-license__help-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--tr-space-1);
    background: none;
    border: none;
    color: var(--tr-color-slate-400);
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-xs);
    cursor: pointer;
    padding: 0;
    margin-top: var(--tr-space-3);
    transition: color var(--tr-transition-fast);
}

.tr-license__help-toggle:hover {
    color: var(--tr-color-primary);
}

.tr-license__help-toggle svg {
    width: 14px;
    height: 14px;
}

.tr-license__help-content {
    display: none;
    margin-top: var(--tr-space-3);
    padding: var(--tr-space-3) var(--tr-space-4);
    background: var(--tr-color-base);
    border-radius: var(--tr-radius-md);
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-600);
    line-height: var(--tr-leading-relaxed);
}

.tr-license__help-content a {
    color: var(--tr-color-primary);
    text-decoration: none;
    font-weight: var(--tr-font-medium);
}

.tr-license__help-content a:hover {
    text-decoration: underline;
}

/* ── Footer ──────────────────────────────────────────────── */

.tr-license__footer {
    margin-top: var(--tr-space-8);
    padding-top: var(--tr-space-6);
    border-top: 1px solid var(--tr-color-surface);
    text-align: center;
}

.tr-license__footer-label {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-400);
    margin: 0 0 var(--tr-space-2) 0;
}

.tr-license__footer-link {
    display: inline-block;
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-700);
    text-decoration: none;
    transition: color var(--tr-transition-fast);
}

.tr-license__footer-link:hover {
    color: var(--tr-color-primary);
}

.tr-license__footer-tagline {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-400);
    margin: var(--tr-space-4) 0 0;
}

/* ── Confetti canvas ─────────────────────────────────────── */

.tr-license__confetti {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999999;
}

/* ── Spinner ─────────────────────────────────────────────── */

@keyframes tr-license-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tr-license__spinner {
    animation: tr-license-spin 1s linear infinite;
}

/* ========================================
   LICENSE TAB — Free Plan (settings page)
   ======================================== */

/* ── Status card ─────────────────────────────────────────── */

.tr-license-free__header {
    display: flex;
    align-items: center;
    gap: var(--tr-space-5);
    padding: var(--tr-space-2) 0;
}

.tr-license-free__header img {
    flex-shrink: 0;
    border-radius: var(--tr-radius-md);
}

.tr-license-free__header .tr-card-title {
    margin: 0;
}

.tr-license-free__header .tr-card-subtitle {
    margin: var(--tr-space-1) 0 0;
}

.tr-license-free__header .tr-badge--free {
    margin-left: auto;
    flex-shrink: 0;
}

.tr-badge--free {
    display: inline-flex;
    align-items: center;
    padding: var(--tr-space-1) var(--tr-space-3);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-600);
    background: var(--tr-color-surface);
    border-radius: var(--tr-radius-full);
    letter-spacing: 0.02em;
}

/* ── Two-column layout ──────────────────────────────────── */

.tr-license-free__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tr-space-6);
}

.tr-license-free__columns .tr-card-body {
    padding-top: var(--tr-space-6);
}

@media (max-width: 860px) {
    .tr-license-free__columns {
        grid-template-columns: 1fr;
    }
}

/* ── Features list ───────────────────────────────────────── */

.tr-license-free__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--tr-space-3);
}

.tr-license-free__features li {
    display: flex;
    align-items: flex-start;
    gap: var(--tr-space-2);
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-700);
    line-height: var(--tr-leading-relaxed);
}

.tr-license-free__features li svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.tr-license-free__features li strong {
    color: var(--tr-color-slate-800);
    font-weight: var(--tr-font-semibold);
}

/* ── "+ X meer" link ─────────────────────────────────────── */

.tr-license-free__more {
    margin: var(--tr-space-4) 0 0;
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-400);
    font-style: italic;
}

/* ── CTA ─────────────────────────────────────────────────── */

.tr-license-free__cta {
    margin-top: var(--tr-space-6);
    text-align: center;
}

.tr-license-free__cta .tr-btn {
    width: 100%;
}

.tr-license-free__benefits {
    margin: var(--tr-space-2) 0 0;
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-400);
}

/* ── Activate link ───────────────────────────────────────── */

.tr-license-free__activate {
    margin: 0;
    text-align: center;
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-500);
}

.tr-license-free__activate a {
    color: var(--tr-color-primary);
    text-decoration: none;
    font-weight: var(--tr-font-medium);
}

.tr-license-free__activate a:hover {
    text-decoration: underline;
}

/* FREE-only "how to activate PRO" guidance (replaces the dead activate link
   when the PRO add-on is not installed — the activation form lives in PRO). */
.tr-license-free__howto {
    margin: 0;
}

.tr-license-free__howto-title {
    margin: 0 0 var(--tr-space-sm);
    text-align: center;
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-700);
}

.tr-license-free__howto-steps {
    margin: 0 auto;
    padding: 0;
    max-width: 420px;
    list-style: none;
    counter-reset: tr-howto;
}

.tr-license-free__howto-steps li {
    position: relative;
    padding: var(--tr-space-xs) 0 var(--tr-space-xs) 32px;
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-500);
    line-height: 1.5;
}

.tr-license-free__howto-steps li::before {
    counter-increment: tr-howto;
    content: counter(tr-howto);
    position: absolute;
    left: 0;
    top: var(--tr-space-xs);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tr-color-primary);
    color: #fff;
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-semibold);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── "No license yet?" CTA row (PRO activation tab) ──────── */

.tr-license__buy {
    margin-top: var(--tr-space-4);
}

.tr-license__buy-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--tr-space-4);
    flex-wrap: wrap;
}

.tr-license__buy-label {
    margin: 0;
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-600);
}
