/* CTC Comparison Table 
 * Used listwithclever.com as color palette inspiration.
 * This file could use some formatting and cleanup as well - adding/removing things makes for a dirty CSS file.
 */

.ctc-cc {
    /* Base surfaces */
    --ctc-bg: #ffffff;
    --ctc-border: #dddedf;
    --ctc-border-soft: #e6e8ea;

    /* Text */
    --ctc-text: #212121;
    --ctc-muted: #616161;
    --ctc-muted-2: #9e9e9e;

    /* Primary action */
    --ctc-primary: #00b0f4;
    --ctc-primary-hover: #0097d1;
 
    /* Status */ 
    --ctc-success: #11b76b; 
  
    /* Stars / highlight */
    --ctc-star: #ffd64f;

    /* Shape / elevation */
    --ctc-radius: 12px;
    --ctc-radius-lg: 14px;
    --ctc-shadow: 0 1px 0 rgba(33, 33, 33, 0.06);

    color: var(--ctc-text);
}

/* Table wrapper */
.ctc-cc__table {
    width: 100%;
}

/* Header row */
.ctc-cc__row {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1.2fr 1.5fr .75fr 3fr;
    column-gap: 18px;
    align-items: center;
}

.ctc-cc__row--head {
    padding: 8px 18px 12px;
}

.ctc-cc__row--head .ctc-cc__cell {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    font-weight: 700;
    color: #6b7280;
}

/* Body rows are cards */
.ctc-cc__body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ctc-cc__row:not(.ctc-cc__row--head) {
    background: var(--ctc-bg);
    border: 1px solid var(--ctc-border);
    border-radius: var(--ctc-radius-lg);
    padding: 18px;
    box-shadow: var(--ctc-shadow);
}

/* cells */
.ctc-cc__cell {
    min-width: 0;
}

.ctc-cc__cell--actions {
    justify-self: end;
}

/* Company column */
.ctc-cc__company {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.ctc-cc__logo {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: #f2f2f2;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.ctc-cc__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.ctc-cc__logoFallback {
    font-weight: 800;
    color: #475569;
    font-size: 14px;
}

.ctc-cc__companyMeta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ctc-cc__companyName {
    font-weight: 600;
    font-size: 14px;
    color: var(--ctc-text);
    max-width: 100%;
}

.ctc-cc__verified {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    cursor: pointer;
}

.ctc-cc__verified svg {
    width: 14px;
    height: 14px;
    fill: var(--ctc-success);
}

.ctc-cc__companySub {
    font-size: 12px;
    color: var(--ctc-muted);
}

.ctc-cc__pin svg {
    width: 12px;
    height: 12px;
    fill: var(--ctc-primary);
}

/* Rating */
.ctc-cc__rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    flex-direction: column;
}

.ctc-cc__stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.ctc-cc__starWrap {
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
}

.ctc-cc__star {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--ctc-star);
    stroke-width: 1.3px;
}

.ctc-cc__starWrap.is-filled .ctc-cc__star {
    fill: var(--ctc-star);
    stroke: var(--ctc-star);
}

.ctc-cc__starWrap.is-empty .ctc-cc__star {
    fill: none;
    opacity: 0.55;
}

.ctc-cc__cell--rating {
    text-align: center;
}

.ctc-cc__ratingValue {
    font-weight: 800;
    font-size: 14px;
    color: var(--ctc-text);
}

.ctc-cc__reviews {
    font-size: 13px;
    color: var(--ctc-muted);
}

/* Fee */
.ctc-cc__feeValue {
    font-weight: 500;
    font-size: 15px;
    color: var(--ctc-text);
}

.ctc-cc__fee {
    text-align: center;
}

.ctc-cc__feeSub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ctc-muted);
}

/* Experience */
.ctc-cc__exp {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.ctc-cc__expLine {
    font-size: 14px;
    color: var(--ctc-text);
}

.ctc-cc__mutedLine {
    color: var(--ctc-muted);
}

/* License */
.ctc-cc__licenseCheck {
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.ctc-cc__licenseCheck svg {
    width: 24px;
    height: 24px;
    fill: var(--ctc-primary);
    cursor: pointer;
}

/* Muted */
.ctc-cc__muted {
    color: var(--ctc-muted);
    font-style: italic;
    font-size: 13px;
}

/* Actions */
.ctc-cc__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 190px;
}

.ctc-cc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.ctc-cc__btnIcon svg,
.ctc-cc__external svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    opacity: 0.9;
}

.ctc-cc__btn--primary {
    background: var(--ctc-primary);
    /* Usually deal with this by increasing specificity, but for sake of time. */
    color: #fff !important;
}

.ctc-cc__btn--primary:hover,
.ctc-cc__btn--primary:focus-visible {
    background: var(--ctc-primary-hover);
}

.ctc-cc__btn--secondary {
    background: #f3f4f6;
    /* Usually deal with this by increasing specificity, but for sake of time. */
    color: var(--ctc-text) !important;
    border-color: rgba(15, 23, 42, 0.08);
}

.ctc-cc__btn--secondary:hover,
.ctc-cc__btn--secondary:focus-visible {
    background: #e9eef3;
}

.ctc-cc__btn--disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: rgba(15, 23, 42, 0.06);
    cursor: not-allowed;
}

.ctc-cc__btn:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.35);
    outline-offset: 2px;
}

.ctc-cc__empty {
    border: 1px dashed var(--ctc-border);
    border-radius: var(--ctc-radius-lg);
    padding: 24px;
    background: #fafafa;
    color: var(--ctc-muted);
}

.ctc-cc__stats {
    display: contents;
}

.ctc-cc__cell--license {
    text-align: center;
}

/* Intro */

.ctc-cc__intro {
    margin: 0 0 28px;
    max-width: 920px;
}

.ctc-cc__document {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ctc-primary);
    margin: 0 0 14px;
}

.ctc-cc__documentIcon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--ctc-primary);
}

.ctc-cc__documentIcon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.ctc-cc__title {
    margin: 0 0 12px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: #0f172a;
    font-size: clamp(32px, 3.2vw, 34px);
}

.ctc-cc__sub {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.55;
    color: var(--ctc-text);
    max-width: 760px;
}

.ctc-cc__info {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    max-width: 820px;
}

.ctc-cc__infoIcon {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: #64748b;
}

.ctc-cc__infoIcon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.ctc-cc__head {
    margin-top: 18px;
}

.ctc-cc__row--head {
    padding: 14px 18px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

/* --- Disclaimer --- */
.ctc-cc__disclaimer {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--ctc-border-soft);
    color: var(--ctc-muted-2);
    font-size: 12px;
    line-height: 1.55;
    max-width: 920px;
}

.ctc-cc__disclaimerLabel {
    font-weight: 800;
    color: var(--ctc-muted-2);
    margin-right: 6px;
}

.ctc-cc__disclaimerText {
    font-weight: 500;
}

/* Mobile: stacked cards */

@media (max-width: 991px) { 
    /* Hide desktop header row */
    .ctc-cc__row--head {
        display: none;
    }

    /* Card layout */
    .ctc-cc__row:not(.ctc-cc__row--head) {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "company"
            "rating"
            "stats"
            "details"
            "actions";
        row-gap: 14px;
        padding: 18px;
        border-radius: 16px;
    }

    .ctc-cc__cell--company {
        grid-area: company;
    }

    .ctc-cc__cell--rating {
        grid-area: rating;
    }

    .ctc-cc__stats {
        grid-area: stats;
    }

    .ctc-cc__cell--actions {
        grid-area: actions;
        justify-self: stretch;
    }

    /* Hide license column in mobile cards */
    .ctc-cc__cell--license {
        display: none;
    }

    .ctc-cc__company {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .ctc-cc__logo {
        width: 56px;
        height: 56px;
        border-radius: 12px;
        flex: 0 0 auto;
    }

    .ctc-cc__companyMeta {
        min-width: 0;
        gap: 2px;
    }

    .ctc-cc__companyName {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ctc-cc__companySub {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 14px;
    }

    /* Rating: single row + divider */
    .ctc-cc__cell--rating {
        padding-top: 12px;
        border-top: 1px solid var(--ctc-border-soft);
    }

    .ctc-cc__rating {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
    }

    .ctc-cc__ratingValue {
        font-size: 16px;
        font-weight: 800;
    }

    .ctc-cc__reviews {
        font-size: 14px;
    }

    .ctc-cc__cell--fee,
    .ctc-cc__cell--exp {
        padding-top: 0;
        border-top: 0;
    }

    /* Stats band */
    .ctc-cc__stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 18px;
        padding-top: 14px;
        border-top: 1px solid var(--ctc-border-soft);
        text-align: center;
    }

    .ctc-cc__feeSub {
        display: none;
    }

    .ctc-cc__feeValue {
        font-size: 18px;
        font-weight: 500;
    }

    .ctc-cc__exp {
        gap: 0;
    }

    .ctc-cc__expLine {
        font-size: 18px;
        font-weight: 500;
    }

    .ctc-cc__mutedLine {
        display: none;
    }

    /* Hide small icons for cleaner mobile stats */
    .ctc-cc__icon {
        display: none;
    }

    .ctc-cc__cell--fee::before {
        content: "Listing Fee";
        display: block;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 0.02em;
        color: var(--ctc-muted);
        margin-bottom: 6px;
    }

    .ctc-cc__cell--exp::before {
        content: "Experience";
        display: block;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 0.02em;
        color: var(--ctc-muted);
        margin-bottom: 6px;
    }

    /* "More details" divider row */
    .ctc-cc__row:not(.ctc-cc__row--head)::after {
        grid-area: details;
        content: "More details \25BE";
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        text-align: center;
        color: var(--ctc-muted);
        font-weight: 400;
        cursor: pointer;
        padding: 14px 0 0;
        border-top: 1px solid var(--ctc-border-soft);
    }

    .ctc-cc__actions {
        width: 100%;
        min-width: 0;
        gap: 12px;
    }

    .ctc-cc__cell--actions {
        width: 100%;
    }

    .ctc-cc__btn {
        width: 100%;
        box-sizing: border-box;
        border-radius: 6px;
    }

    .ctc-cc__btn--primary {
        color: #fff !important;
    }

    .ctc-cc__btn--primary .ctc-cc__btnIcon,
    .ctc-cc__btn--primary .ctc-cc__btnIcon svg {
        color: currentColor;
        fill: currentColor;
    }

    .ctc-cc__intro {
        margin-bottom: 18px;
        max-width: 100%;
    }

    .ctc-cc__title {
        font-size: clamp(28px, 8vw, 38px);
    }

    .ctc-cc__sub {
        font-size: 16px;
    }

    .ctc-cc__document {
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .ctc-cc__stats {
        grid-template-columns: 1fr;
        row-gap: 14px;
    }
}

@media (max-width: 520px) {
    .ctc-cc__logo {
        width: 48px;
        height: 48px;
    }

    .ctc-cc__companyName {
        font-size: 14px;
    }

    .ctc-cc__btn {
        padding: 12px 12px;
    }
}