
:root {
    --tm-primary: #FF7A00;
    --tm-primary-hover: #FF8F26;
    --tm-primary-soft: rgba(255,122,0,0.12);
    --tm-primary-border: rgba(255,122,0,0.22);
    --tm-primary-glow: rgba(255,122,0,0.14);
    --tm-dark: #081521;
    --tm-secondary: #081521;
    --tm-slate: rgba(255,255,255,0.72);
    --tm-muted: rgba(255,255,255,0.62);
    --tm-border: rgba(255,255,255,0.08);
    --tm-strong-border: rgba(255,255,255,0.12);
    --tm-surface: rgba(255,255,255,0.05);
    --tm-active-surface: rgba(255,255,255,0.07);
    --tm-background: #081521;
    --tm-text: #FFFFFF;
    --tm-success: #22C55E;
    --tm-warning: #F59E0B;
    --tm-danger: #EF4444;
    --tm-radius-sm: 9px;
    --tm-radius-md: 14px;
    --tm-radius-lg: 20px;
    --tm-shadow-sm: 0 8px 22px rgba(255,122,0,0.08);
    --tm-shadow-md: 0 18px 45px rgba(255,122,0,0.14);
}

[class^="tm-"],
[class*=" tm-"],
[class^="tm-"] *,
[class*=" tm-"] * {
    box-sizing: border-box;
    min-width: 0;
}

.tm-expandable-text {
    max-width: 100%;
}

.tm-expandable-text-content {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    line-height: 1.72;
}

.tm-expandable-text-toggle {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tm-primary);
    cursor: pointer;
    font-weight: 800;
}

.tm-expandable-text-toggle:hover,
.tm-expandable-text-toggle:focus {
    text-decoration: underline;
}

/* Premium reviewer profile */
.tm-premium-profile {
    overflow-x: hidden;
}

.tm-reviewer-container {
    width: min(1120px, calc(100% - 32px));
}

.tm-reviewer-hero-premium {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: clamp(26px, 4vw, 44px);
    border-radius: var(--tm-radius-lg);
    background:
        radial-gradient(circle at top right, rgba(255, 122, 0, .22), transparent 34%),
        linear-gradient(135deg, #374151, #081521);
    box-shadow: var(--tm-shadow-md);
}

.tm-reviewer-hero-premium::after {
    content: "";
    position: absolute;
    right: -55px;
    bottom: -80px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.tm-reviewer-avatar-large {
    width: 140px;
    height: 140px;
    min-width: 140px;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, .2);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
}

.tm-reviewer-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tm-reviewer-hero-content {
    position: relative;
    z-index: 1;
}

.tm-reviewer-hero-content h1 {
    margin: 5px 0 12px;
    overflow-wrap: anywhere;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.05;
}

.tm-reviewer-language-line {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .82);
}

.tm-reviewer-about-inline {
    max-width: 760px;
    margin-top: 14px;
    color: rgba(255, 255, 255, .86);
}

.tm-reviewer-about-inline .tm-expandable-text-toggle {
    color: #FF8F26;
}

.tm-reviewer-stats-premium {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tm-reviewer-stats-premium > div {
    box-shadow: var(--tm-shadow-sm);
}

.tm-reviewer-content-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tm-reviewer-sidebar-card,
.tm-reviewer-reviews {
    border: 1px solid var(--tm-border);
    border-radius: var(--tm-radius-lg);
    background: var(--tm-surface);
    box-shadow: var(--tm-shadow-sm);
}

.tm-reviewer-sidebar-card {
    position: sticky;
    top: 24px;
    padding: 24px;
}

.tm-reviewer-sidebar-card h2 {
    margin-top: 0;
    color: var(--tm-dark);
}

.tm-reviewer-sidebar-card dl {
    margin: 22px 0 0;
}

.tm-reviewer-sidebar-card dl > div {
    padding: 13px 0;
    border-top: 1px solid var(--tm-border);
}

.tm-reviewer-sidebar-card dt {
    color: var(--tm-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.tm-reviewer-sidebar-card dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: var(--tm-dark);
    font-weight: 700;
}

.tm-reviewer-section-heading {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.tm-reviewer-section-heading h2 {
    margin: 4px 0 0;
}

.tm-reviewer-section-heading > span {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--tm-primary-soft);
    color: var(--tm-primary);
    font-size: 12px;
    font-weight: 800;
}

/* Global overflow protection */
.tm-review-item,
.tm-profile-card,
.tm-pd-section,
.tm-rd-card,
.tm-provider-result,
.tm-seo-provider-card,
.tm-registration-card,
.tm-reviewer-reviews,
.tm-reviewer-sidebar-card {
    overflow: hidden;
}

.tm-review-item p,
.tm-profile-card p,
.tm-pd-section p,
.tm-rd-card p,
.tm-provider-result p,
.tm-seo-provider-card p,
.tm-registration-card p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tm-review-item img,
.tm-profile-card img,
.tm-pd-section img,
.tm-rd-card img,
.tm-provider-result img,
.tm-seo-provider-card img,
.tm-registration-card img {
    max-width: 100%;
    height: auto;
}

.tm-review-item iframe,
.tm-profile-card iframe,
.tm-pd-section iframe,
.tm-rd-card iframe {
    max-width: 100%;
}

/* Responsive tables without removing columns */
.tm-wrap table {
    width: 100%;
}

@media (max-width: 900px) {
    .tm-wrap {
        overflow-x: auto;
    }

    .tm-wrap table {
        min-width: 900px;
    }
}

@media (max-width: 900px) {
    .tm-reviewer-content-grid {
        grid-template-columns: 1fr;
    }

    .tm-reviewer-sidebar-card {
        position: static;
    }

    .tm-reviewer-stats-premium {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .tm-reviewer-page,
    .tm-review-verify-page,
    .tm-reviewer-dashboard,
    .tm-provider-dashboard,
    .tm-registration-page,
    .tm-results-page,
    .tm-seo-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .tm-reviewer-container,
    .tm-results-container,
    .tm-seo-container,
    .tm-pd-shell,
    .tm-rd-shell,
    .tm-registration-shell {
        width: 100%;
    }

    .tm-reviewer-hero-premium {
        grid-template-columns: 1fr;
        gap: 18px;
        text-align: center;
    }

    .tm-reviewer-avatar-large {
        width: 112px;
        height: 112px;
        min-width: 112px;
        margin: 0 auto;
    }

    .tm-reviewer-badges,
    .tm-reviewer-extra {
        justify-content: center;
    }

    .tm-reviewer-about-inline {
        text-align: left;
    }

    .tm-reviewer-section-heading,
    .tm-review-toolbar,
    .tm-review-item-top,
    .tm-pd-header,
    .tm-rd-header,
    .tm-results-toolbar,
    .tm-seo-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .tm-reviewer-stats-premium,
    .tm-rd-stats,
    .tm-pd-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tm-reviewer-sidebar-card,
    .tm-reviewer-reviews,
    .tm-review-item,
    .tm-profile-card,
    .tm-pd-section,
    .tm-rd-card,
    .tm-registration-card,
    .tm-registration-intro {
        padding: 18px;
        border-radius: 14px;
    }

    .tm-review-actions,
    .tm-result-actions,
    .tm-seo-card-actions,
    .tm-pd-header-actions,
    .tm-rd-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .tm-review-actions a,
    .tm-result-actions a,
    .tm-seo-card-actions a,
    .tm-pd-header-actions a,
    .tm-rd-header-actions a,
    .tm-btn,
    .tm-pd-button,
    .tm-rd-button,
    .tm-results-button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .tm-review-form-grid,
    .tm-pd-grid,
    .tm-rd-grid,
    .tm-registration-grid,
    .tm-seo-provider-grid,
    .tm-seo-link-grid,
    .tm-results-layout,
    .tm-pd-layout,
    .tm-rd-layout {
        grid-template-columns: 1fr;
    }

    .tm-review-filter-chips {
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .tm-review-filter-chips a {
        flex: 0 0 auto;
    }

    .tm-review-premium-header {
        padding: 18px;
    }

    .tm-review-big-score {
        font-size: 46px;
    }

    .tm-review-distribution a {
        grid-template-columns: 44px minmax(0, 1fr) 24px;
    }
}

@media (max-width: 480px) {
    .tm-reviewer-stats-premium,
    .tm-rd-stats,
    .tm-pd-cards {
        grid-template-columns: 1fr;
    }

    .tm-reviewer-hero-premium,
    .tm-reviewer-sidebar-card,
    .tm-reviewer-reviews,
    .tm-review-item,
    .tm-profile-card,
    .tm-pd-section,
    .tm-rd-card {
        padding: 16px;
    }

    .tm-review-stars {
        font-size: 18px;
    }

    .tm-star-selector button {
        font-size: 36px;
    }
}
