@import './common.css';

/* Header Text */
.sub-header-label {
    color: var(--p);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}


/* Timeline Layout */
.matches-timeline {
    position: relative;
    padding-left: 0;
}

/* Vertical dashed line */
.matches-timeline::before {
    content: '';
    position: absolute;
    left: 30%;
    top: 0;
    bottom: 0;
    width: 2px;
    border-left: 2px dashed rgba(0, 188, 212, 0.4);
    z-index: 1;
}

/* Row wrapper organizing columns and nodes */
.match-timeline-row {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 1.5rem;
}

/* Left portion (Date and Commentary) */
.timeline-left {
    width: 30%;
    padding-right: 40px;
    text-align: left;
    z-index: 2;
}

.date-badge {
    display: inline-block;
    border: 1px solid var(--p);
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 6px 16px;
    margin-bottom: 25px;
    position: relative;
}

/* Connector line running from left badge to timeline axis node */
.date-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -41px;
    width: 41px;
    height: 1px;
    background-color: var(--p);
}

.commentary-highlight {
    font-family: var(--f2);
    font-size: 18px;
    font-weight: 300;
    color: var(--text-color);
    line-height: 1.2;
    margin: 0;
    max-width: 50%;
}

/* Axis Node styling */
.timeline-node-container {
    position: absolute;
    left: 30%;
    transform: translateX(-50%);
    z-index: 3;
}

.timeline-node {
    width: 12px;
    height: 12px;
    background-color: var(--p);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--p);
}

/* Right portion (Live Stats Card) */
.timeline-right {
    width: 70%;
    padding-left: 30px;
    z-index: 2;
}

/* Base Card structure with notched top-right corner */
.match-info-card {
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    padding: 30px;
    position: relative;
    clip-path: polygon(0 0, 93% 0, 100% 12%, 100% 100%, 0 100%);
    transition: transform 0.2s ease;
}

.match-info-card:hover {
    transform: translateY(-2px);
}

/* Header line within details card */
.card-top-bar {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(26, 58, 68, 0.5);
    padding-bottom: 12px;
}

.live-indicator {
    color: #ef4444;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-upcoming {
    color: var(--p);
}

.status-completed {
    color: #22c55e;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.venue-info {
    color: var(--muted-text-color);
    font-size: 0.85rem;
}

.time-stamp {
    color: var(--p);
    margin-left: 10px;
    font-weight: 600;
}

/* Team layout content */
.team-logo-wrap {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.bg-yellow-gradient {
    background: radial-gradient(circle, #facc15 0%, #ca8a04 100%);
}

.bg-blue-gradient {
    background: radial-gradient(circle, #1e3a8a 0%, #172554 100%);
}

.team-logo {
       width: 100%;
    height: 100%;
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.team-name {
    display: block;
    font-size: 0.8rem;
    color: var(--p);
    margin-bottom: 4px;
}

.team-score {
    font-family: var(--f2);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.overs {
    font-size: 0.8rem;
    color: var(--muted-text-color);
    font-weight: 400;
}

.vs-text {
    font-style: italic;
    font-weight: 900;
    font-size: 1.5rem;
    color: rgb(255, 255, 255);
}

/* Notched Score Arena Action Button */
.btn-score-arena {
    display: inline-block;
    color: var(--p);
    border: 1px solid var(--p);
    background: transparent;
    padding: 10px 24px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: all 0.2s ease;
}

.btn-score-arena:hover {
    background-color: var(--p);
    color: #000;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .matches-timeline::before {
        left: 20px;
    }
    .match-timeline-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .timeline-left {
        width: 100%;
        padding-left: 45px;
        padding-right: 0;
        margin-bottom: 15px;
    }
    .timeline-node-container {
        left: 20px;
        top: 20px;
    }
    .date-badge::after {
        display: none;
    }
    .timeline-right {
        width: 100%;
        padding-left: 45px;
    }
    .match-info-card {
        clip-path: none;
    }
    .card-main-content {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start !important;
    }
    .team-block {
        text-align: left !important;
        flex-row-reverse: row !important;
    }
}


.cta1 {
    position: relative;
    background-color: #00b8d4;
    border: none;
    cursor: pointer;
    clip-path: polygon(0% 0%, 85% 0%, 100% 35%, 100% 100%, 0% 100%);
    color: #000000;
    font-family: "SpaceGrotesk", sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 20px;
    min-width: 200px;
    transition: background-color 0.3s ease;
    text-decoration: none !important;
    display: inline-block;
    text-align: center;
    overflow: hidden; /* Keeps the action inside the button 'field' */
}

/* The Ball */
.cta1::before {
    content: "";
    position: absolute;
    left: 40px; /* Positioned where the bat will hit it */
    top: 50%;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #800000);
    border-radius: 50%;
    transform: translateY(-50%);
    opacity: 0;
    z-index: 2;
}

/* The Bat */
.cta1::after {
    content: "🏏";
    position: absolute;
    left: -30px; /* Start off-screen to the left */
    top: 50%;
    font-size: 24px;
    transform: translateY(-50%) rotate(-45deg);
    transition: none;
    z-index: 3;
}

/* Hover Animations */
.cta1:hover {
    animation: button-shake 0.1s 0.15s; /* Shakes exactly at impact */
}

.cta1:hover::after {
    animation: bat-swing-across 0.5s ease-in forwards;
}

.cta1:hover::before {
    animation: ball-shot-right 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.15s; /* Wait for the bat to arrive */
}

/* 1. Bat swings from left and hits */
@keyframes bat-swing-across {
    0% { left: -30px; transform: translateY(-50%) rotate(-45deg); opacity: 1; }
    30% { left: 15px; transform: translateY(-50%) rotate(10deg); } /* Impact Point */
    100% { left: 30px; transform: translateY(-50%) rotate(20deg); opacity: 0; } /* Follow through */
}

/* 2. Ball zips to the right corner */
@keyframes ball-shot-right {
    0% { left: 35px; opacity: 1; transform: translateY(-50%) scale(1); }
    10% { transform: translateY(-50%) scale(1.2); } /* Slight squish/stretch on hit */
    90% { opacity: 1; }
    100% { left: 90%; opacity: 0; transform: translateY(-50%) scale(0.8); }
}

/* 3. Button reaction */
@keyframes button-shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(2px); }
    50% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}