body {
    margin: 0;
    padding: 0;
    background: transparent;
    text-rendering: geometricPrecision;
}

/* color variants */

.widget-main .team-name,
.widget-main.gold .team-name,
.widget-main.bubbles .match-status:before,
.widget-main.gold.bubbles .match-status:before {
    background-color: #D5A940;
}

.widget-main .match-score,
.widget-main .empty-goal,
.widget-main .penalty,
.widget-main.gold .match-score,
.widget-main.gold .empty-goal,
.widget-main.gold .penalty {
    background-color: #E9CE76;
}

.widget-main .match-time-line,
.widget-main .match-section,
.widget-main.bubbles .match-time:before {
    background-color: #808080;
}

.widget-main .match-time .match-section,
.widget-main .match-time-line {
    color: #F8F8F8;
}

.empty-goal,
.penalty {
    color: #303030;
}

.widget-main.copper .team-name,
.widget-main.copper.bubbles .match-status:before {
    background-color: #C48E44;
    color: #202020;
}

.widget-main.strip .match-score .score-divider {
    background-color: #202020;
}

.widget-main.copper .empty-goal,
.widget-main.copper .penalty,
.widget-main.copper .match-score {
    background-color: #eac997;
    color: #404040;
}

.widget-main.sky .team-name,
.widget-main.sky.bubbles .match-status:before {
    background-color: #4E7AC7;
}

.widget-main.sky .empty-goal,
.widget-main.sky .penalty,
.widget-main.sky .match-score {
    background-color: #7FB2F0;
}

.widget-main.ocean .team-name,
.widget-main.ocean.bubbles .match-status:before {
    background-color: #1FAFDD;
}

.widget-main.ocean .empty-goal,
.widget-main.ocean .penalty,
.widget-main.ocean .match-score {
    background-color: #1ED3CF;
}

.widget-main.silver .team-name,
.widget-main.silver.bubbles .match-status:before {
    background-color: #BDB9BB;
}

.widget-main.silver .empty-goal,
.widget-main.silver .penalty,
.widget-main.silver .match-score {
    background-color: #DEDCDD;
}

.widget-main.sunset .team-name,
.widget-main.sunset.bubbles .match-status:before {
    background-color: #E7585E;
}

.widget-main.sunset .empty-goal,
.widget-main.sunset .penalty,
.widget-main.sunset .match-score {
    background-color: #FF693E;
}

.widget-main.sun .team-name,
.widget-main.sun.bubbles .match-status:before {
    background-color: #E9840E;
}

.widget-main.sun .empty-goal,
.widget-main.sun .penalty,
.widget-main.sun .match-score {
    background-color: #F4C008;
}

.widget-main.jungle .team-name,
.widget-main.jungle.bubbles .match-status:before {
    background-color: #63A467;
}

.widget-main.jungle .empty-goal,
.widget-main.jungle .penalty,
.widget-main.jungle .match-score {
    background-color: #B1DB5B;
}

/* general */

.widget-main .hidden {
    display: none;
}

.widget-main {
    width: 100%;
    margin: 0 auto;
    font-family: Helvetica, Arial, sans-serif;
}

.widget-main.preview {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 1920px;
    height: 1080px;
    margin: 20px auto;
    border: 1px solid #ccc;
}

.widget-main.preview::after {
    content: ' ';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -10;
    background-color: #ccf;
}

.content-row {
    position: relative;
    margin: 0 auto;
    text-align: center;
    white-space: nowrap;
}

.content-row * {
    display: inline-block;
}

.team-name {
    font-size: 24px;
    white-space: nowrap;
    overflow: hidden;
}

.match-score {
    font-size: 38px;
    font-weight: bold;
    white-space: nowrap;
    overflow: visible;
}

.score-divider {
    width: 16px;
    padding: 0 3px 0 2px;
    text-align: center;
}

.match-section,
.time-value {
    font-size: 22px;
    font-weight: bold;
}

.time-divider {
    width: 22px;
    padding: 0 0 1px 0;
    text-align: center;
    vertical-align: bottom;
    font-size: 25px;
    line-height: 30px;
}

.pause .time-divider {
    font-size: 20px;
    font-weight: bold;
    line-height: 28px;
}

.pause .time-divider:before {
    content: ' ';
    display: inline-block;
    width: 3px;
    height: 12px;
    margin: 2px 0;
    border-left: 3px solid #D00000;
    border-right: 3px solid #D00000;
}

.play .time-divider:before {
    content: ' ';
    box-sizing: border-box;
    display: inline-block;
    width: 12px;
    height: 14px;
    margin: 2px 0;
    border-style: solid;
    border-width: 7px 0 7px 12px;
    border-color: transparent transparent transparent #00C000;
}

.empty-goal {
    display: none;
}

.empty-goal.on {
    display: block;
    position: absolute;
    background-image: url("../images/goal.png");
    background-repeat: no-repeat;
    background-position: center center;
    font-weight: bold;
}

.penalties {
    position: absolute;
}

.team-home .penalties {
    text-align: left;
}

.team-guest .penalties {
    text-align: right;
}

.penalty {
    display: none;
    font-size: 18px;
    font-style: normal;
    font-weight: bold;
    text-align: center;
}

/* diamond */

.widget-main.diamond .content-row {
    margin: 20px;
}

.widget-main.diamond .team {
    position: relative;
    margin-top: 33px;
    vertical-align: top;
    line-height: 40px;
}

.widget-main.diamond .team-home {
    margin-right: -30px;
}

.widget-main.diamond .team-guest {
    margin-left: -30px;
}

.widget-main.diamond .team-home .team-name {
    padding-right: 32px;
    padding-left: 18px;
}

.widget-main.diamond .team-guest .team-name {
    padding-left: 32px;
    padding-right: 18px;
}

.widget-main.diamond .team-name {
    width: 84px;
    height: 40px;
    padding-top: 2px;
    vertical-align: bottom;
    text-align: center;
}

.widget-main.diamond .team-color {
    width: 28px;
    height: 42px;
}

.widget-main.diamond .team-home .team-color {
    margin: 0 -15px 0 0;
    clip-path: polygon(48% 0, 100% 0, 55% 55%, 100% 100%, 48% 100%, 0 56%);
}

.widget-main.diamond .team-guest .team-color {
    margin: 0 0 0 -15px;
    clip-path: polygon(0 0, 52% 0, 100% 56%, 52% 100%, 0 100%, 45% 55%);
}

.widget-main.diamond .match-status {
    position: relative;
    width: 160px;
    height: 80px;
    padding: 20px 0 0;
    z-index: 1;
}

.widget-main.diamond .match-score {
    width: 160px;
    clip-path: polygon(16px 0, 144px 0, 100% 60%, 143px 100%, 17px 100%, 0 60%);
    line-height: 44px;
}

.widget-main.diamond .team-score {
    width: 64px;
    padding-top: 5px;
}

.widget-main.diamond .score-home {
    text-align: right;
}

.widget-main.diamond .score-guest {
    text-align: left;
}

.widget-main.diamond .match-section {
    position: absolute;
    top: 7px;
    left: 65px;
    width: 30px;
    height: 29px;
    line-height: 23px;
    clip-path: polygon(6px 0, 24px 0, 100% 55%, 50% 100%, 0 55%);
}

.widget-main.diamond .match-time-line {
    position: absolute;
    top: 68px;
    left: 16px;
    width: 128px;
    clip-path: polygon(0 0, 100% 0, 100px 100%, 28px 100%);
}

.widget-main.diamond .time-value {
    line-height: 32px;
}

.widget-main.diamond .empty-goal {
    bottom: 37px;
    width: 38px;
    height: 28px;
    clip-path: polygon(50% 100%, 100% 70%, 80% 0, 20% 0, 0 70%);
}

.widget-main.diamond .team-home .empty-goal {
    left: 20px;
}

.widget-main.diamond .team-guest .empty-goal {
    right: 20px;
}

.widget-main.diamond .penalties {
    top: 37px;
    width: 100px;
    display: flex;
}

.widget-main.diamond .team-home .penalties {
    left: 18px;
    justify-content: flex-start;
}

.widget-main.diamond .team-guest .penalties {
    right: 18px;
    justify-content: flex-end;
}

.widget-main.diamond .penalty {
    height: 25px;
    padding: 2px 8px 0;
    line-height: 28px;
    clip-path: polygon(50% 0, 100% 30%, 80% 100%, 20% 100%, 0 30%);
}

/* bubbles */

.widget-main.bubbles .team {
    position: relative;
    margin-top: 23px;
}

.widget-main.bubbles .team-home {
    position: relative;
    margin-right: 100px;
}

.widget-main.bubbles .team-guest {
    position: relative;
    margin-left: 100px;
}

.widget-main.bubbles .team-name {
    width: 77px;
    height: 77px;
    border-radius: 50%;
    line-height: 68px;
}

.widget-main.bubbles .team-color {
    position: absolute;
    width: 77px;
    height: 77px;
    border-radius: 50%;
    clip-path: polygon(0 64%, 100% 64%, 100% 100%, 0 100%);
}

.widget-main.bubbles .team-guest .team-color {
    right: 0;
}

.widget-main.bubbles .match-status {
    position: relative;
    top: -31px;
}

.widget-main.bubbles .match-status:before {
    content: '';
    z-index: -1;
    position: absolute;
    top: 56px;
    left: -150px;
    width: 420px;
    height: 6px;
}

.widget-main.bubbles .match-score {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    line-height: 108px;
}

.widget-main.bubbles .team-score {
    position: absolute;
    width: 90px;
    overflow: visible;
}

.widget-main.bubbles .score-home.team-score {
    right: 57%;
    text-align: right;
}

.widget-main.bubbles .score-guest.team-score {
    left: 57%;
    text-align: left;
}

.widget-main.bubbles .match-section {
    position: absolute;
    top: 8px;
    left: 48px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    line-height: 23px;
}

.widget-main.bubbles .match-time {
    position: absolute;
    left: 0;
    background: transparent;
}

.widget-main.bubbles .match-time:before {
    content: '';
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    clip-path: polygon(0 64%, 100% 64%, 100% 100%, 0 100%);
}

.widget-main.bubbles .match-time-line {
    position: absolute;
    top: 64%;
    left: 0;
    width: 120px;
    background: transparent;
}

.widget-main.bubbles .time-value {
    line-height: 32px;
}

.widget-main.bubbles .empty-goal {
    top: -17px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.widget-main.bubbles .team-home .empty-goal {
    right: -10px;
}

.widget-main.bubbles .team-guest .empty-goal {
    left: -10px;
}

.widget-main.bubbles .penalties {
    top: 24px;
    display: flex;
    width: 100px;
    background: transparent;
}

.widget-main.bubbles .team-home .penalties {
    left: 77px;
}

.widget-main.bubbles .team-guest .penalties {
    right: 77px;
}

.widget-main.bubbles .team-guest .penalties {
    flex-direction: row-reverse;
}

.widget-main.bubbles .penalty {
    min-width: 15px;
    height: 27px;
    border-radius: 13.5px;
    line-height: 27px;
    padding: 0 6px;
}

.widget-main.bubbles .team-home .penalty {
    margin-left: 1px;
}

.widget-main.bubbles .team-guest .penalty {
    margin-right: 1px;
}

/* strip */

.widget-main.strip.preset .team-name {
    background-color: #ededed;
}

.widget-main.strip.preset .team-home .team-color {
    border-right-color: rgba(29, 47, 86, 0.5);
}

.widget-main.strip.preset .team-guest .team-color {
    border-right-color: rgba(29, 47, 86, 0.5);
}

.widget-main.strip.preset .match-time-line {
    background-color: transparent;
}

.widget-main.strip.preset .match-score {
    background-color: #0b142c;
    color: #ff9514;
}

.widget-main.strip.preset .match-score .score-divider {
    background-color: #ccc;
}

.widget-main.strip.preset .match-section {
    color: #ddd;
}

.widget-main.strip.preset .match-time-line {
    background-color: #1d2f56;
    color: #fff;
}

.widget-main.strip.preset .empty-goal,
.widget-main.strip.preset .penalty {
    background-color: #ff9514;
}

.widget-main.strip.preset .penalty {
    color: #1d2f56;
}

.widget-main.strip .content-row {
    display: flex;
    justify-content: center;
    margin: 10px;
}

.widget-main.strip .team {
    position: relative;
    display: flex;
    margin-top: 10px;
}

.widget-main.strip .team-name {
    width: 144px;
    height: 60px;
    line-height: 60px;
    font-size: 40px;
}

.widget-main.strip .team-label {
    font-weight: bold;
    scale: 0.7 1;
}

.widget-main.strip .team-home .team-name {
    margin-right: -40px;
    padding-right: 50px;
}

.widget-main.strip .team-guest .team-name {
    margin-left: -40px;
    padding-left: 50px;
}

.widget-main.strip .team-color {
    width: 12px;
    height: 60px;
}

.widget-main.strip .team-home .team-color {
    border-left: 1px solid rgba(136, 136, 136, 0.5);
}

.widget-main.strip .team-guest .team-color {
    border-left: 1px solid rgba(136, 136, 136, 0.5);
}

.widget-main.strip .match-status {
    position: relative;
}

.widget-main.strip .match-score {
    position: relative;
    width: 200px;
    display: flex;
    justify-content: center;
    border-radius: 32px;
    z-index: 5;
    line-height: 80px;
    font-size: 54px;
    text-align: center;
}

.widget-main.strip .match-score .score-divider {
    width: 2px;
    height: 24px;
    margin: 36px 6px 6px;
    padding: 0;
    color: transparent;
}

.widget-main.strip .team-score {
    width: 72px;
    scale: 0.8 1;
}

.widget-main.strip .score-home.team-score {
    text-align: left;
}

.widget-main.strip .score-guest.team-score {
    text-align: right;
}

.widget-main.strip .match-section {
    position: absolute;
    top: 6px;
    left: 90px;
    width: 21px;
    z-index: 9;
    line-height: 22px;
    font-size: 18px;
    border-radius: 8px;
    text-align: center;
}

.widget-main.strip .match-time-line {
    display: flex;
    justify-content: center;
    width: 153px;
    height: 45px;
    margin: -4px auto;
    border-radius: 0 0 10px 10px;
}

.widget-main.strip .time-value {
    font-size: 32px;
    line-height: 44px;
}

.widget-main.strip .time-divider {
    font-size: 25px;
    line-height: 44px;
}

.widget-main.strip .empty-goal {
    top: -23px;
    width: 35px;
    height: 30px;
    padding: 0 5px;
    border-radius: 12px;
    line-height: 34px;
    font-size: 20px;
}

.widget-main.strip .team-home .empty-goal {
    left: 9px;
}

.widget-main.strip .team-guest .empty-goal {
    right: 9px;
}

.widget-main.strip .penalties {
    top: 59px;
    width: 156px;
}

.widget-main.strip .team-home .penalties {
    left: 5px;
}

.widget-main.strip .team-guest .penalties {
    right: 5px;
}

.widget-main.strip .penalty {
    margin: -5px 4px 0;
    padding: 0 5px;
    border-radius: 10px;
    line-height: 32px;
    font-size: 24px;
}

/* general */

.x-1 .penalty.x-1,
.x-2 .penalty.x-1,
.x-2 .penalty.x-2,
.x-3 .penalty.x-1,
.x-3 .penalty.x-2,
.x-3 .penalty.x-3,
.x-4 .penalty.x-1,
.x-4 .penalty.x-2,
.x-4 .penalty.x-3,
.x-4 .penalty.x-4,
.x-5 .penalty.x-1,
.x-5 .penalty.x-2,
.x-5 .penalty.x-3,
.x-5 .penalty.x-4,
.x-5 .penalty.x-5 {
    display: inline-block;
}

.penalty .left {
    display: none;
}

.x-1 .penalty.x-1 .symbol,
.x-2 .penalty.x-1 .symbol,
.x-2 .penalty.x-2 .symbol {
    display: none;
}

.x-1 .penalty.x-1 .left,
.x-2 .penalty.x-1 .left,
.x-2 .penalty.x-2 .left {
    display: inline-block;
}
/* MatchGuide: no data (yet) or not to be shown */
.widget-main.empty,
.widget-main.hidden {
    visibility: hidden;
}

.match-downs {
    width: max-content;
    margin: 0 auto;
    padding: 2px 10px;
    border-radius: 4px;
    color: #fff;
    background: rgba(0, 0, 0, 0.75);
    font-size: 14px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
}

.match-downs:empty {
    display: none;
}

/* the full name of a team: only the ticker shows it */
.widget-main .team-full {
    display: none;
}

/* ticker: the scoreboard of the MatchTicker app - the teams above with their colors at the outer edges,
   the score large, the clock below; on a dark panel of its own, so it shows on any page */

.widget-main.ticker {
    box-sizing: border-box;
    max-width: 40rem;
    padding: 12px 16px 14px;
    border-radius: 16px;
    color: #FFFFFF;
    background: #1C1C1E;
    font-family: -apple-system, Helvetica, Arial, sans-serif;
}

.widget-main.ticker .content-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "home guest" "status status";
    column-gap: 16px;
    row-gap: 2px;
    margin: 0;
}

.widget-main.ticker .team {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
}

.widget-main.ticker .team-home {
    grid-area: home;
    justify-content: flex-start;
}

.widget-main.ticker .team-guest {
    grid-area: guest;
    justify-content: flex-end;
}

/* the full name small below the label, like in the app: at most two lines */
.widget-main.ticker .team-full {
    display: -webkit-box;
    flex-basis: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #8E8E93;
    font-size: 13px;
    line-height: 1.3;
    text-align: left;
    white-space: normal;
}

.widget-main.ticker .team-full:empty {
    display: none;
}

.widget-main.ticker .team-guest .team-full {
    text-align: right;
}

.widget-main.ticker .team-color {
    width: 12px;
    height: 24px;
    border-radius: 3px;
    box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    color: transparent;
}

.widget-main.ticker .team-name {
    padding: 0;
    color: #FFFFFF;
    background: none;
    font-size: 22px;
    font-weight: bold;
}

.widget-main.ticker .penalties,
.widget-main.ticker .empty-goal.on,
.widget-main.ticker .match-section {
    display: none;
}

.widget-main.ticker .match-status {
    grid-area: status;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.widget-main.ticker .match-score {
    color: #FFFFFF;
    background: none;
    font-size: 56px;
    line-height: 64px;
    font-variant-numeric: tabular-nums;
}

.widget-main.ticker .score-divider {
    width: auto;
    padding: 0 0.25em;
    background: none;
}

.widget-main.ticker .match-time,
.widget-main.ticker .match-time-line {
    color: #8E8E93;
    background: none;
}

.widget-main.ticker .time-value {
    font-size: 28px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* like the app: a note instead of an empty panel before the first data */
.widget-main.ticker.empty {
    visibility: visible;
}

.widget-main.ticker.empty .content-row,
.widget-main.ticker.empty .match-downs {
    display: none;
}

.widget-main.ticker.empty::after {
    content: 'Waiting for the match to start.';
    display: block;
    padding: 8px 0;
    color: #8E8E93;
    font-size: 17px;
    text-align: center;
}
