/**
 * Ticket Pricing Timeline Styles
 * 
 * @package Ticket_Pricing_Timeline
 */

/* ==========================================================================
   Timeline Container
   ========================================================================== */

.tpt-timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tpt-event-title {
    text-align: center;
    margin-bottom: 30px;
}

.tpt-event-title h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.tpt-event-description {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* ==========================================================================
   Timeline Wrapper
   ========================================================================== */

.tpt-timeline-wrapper {
    position: relative;
    margin: 55px 0;
}

/* ==========================================================================
   Progress Bar Style
   ========================================================================== */

.tpt-style-progress .tpt-progress-container {
    position: relative;
    margin-bottom: 40px;
}

.tpt-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tpt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
    position: relative;
}

.tpt-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 25%, 
        rgba(255,255,255,0.1) 25%, 
        rgba(255,255,255,0.1) 50%, 
        transparent 50%, 
        transparent 75%, 
        rgba(255,255,255,0.1) 75%);
    background-size: 20px 20px;
    animation: progress-animation 2s linear infinite;
}

@keyframes progress-animation {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

/* ==========================================================================
   Phases Container
   ========================================================================== */

.tpt-phases-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    justify-content: space-between;
    margin-top: 20px;
}

.tpt-timeline-item {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    padding: 15px;
    container-type: inline-size;
    container-name: timeline-card;
}

.tpt-timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    /* background: #3a3a3a;*/
    border-color: #555; 
}

/* ==========================================================================
   Phase States
   ========================================================================== */

.tpt-phase-past {
    border-color: #9e9e9e;
    background: #f5f5f5;
}

.tpt-phase-past .tpt-phase-marker {
    background: #9e9e9e;
}

.tpt-phase-current {
    border-color: #4CAF50;
    background: #f8fff8;
    animation: pulse-current 2s infinite;
}

.tpt-phase-current .tpt-phase-marker {
    background: #4CAF50;
    animation: pulse-marker 2s infinite;
}

.tpt-phase-future {
    border-color: #e0e0e0;
    background: #fafafa;
}

.tpt-phase-future .tpt-phase-marker {
    background: #e0e0e0;
}

@keyframes pulse-current {
    0% { box-shadow: 0 2px 12px rgba(76, 175, 80, 0.1); }
    50% { box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3); }
    100% { box-shadow: 0 2px 12px rgba(76, 175, 80, 0.1); }
}

@keyframes pulse-marker {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* ==========================================================================
   Phase Marker
   ========================================================================== */

.tpt-phase-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -13px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    z-index: 1;
}

.tpt-phase-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    color: #333;
    margin-bottom: 8px;
}

/* ==========================================================================
   Phase Content
   ========================================================================== */

.tpt-phase-content {
    text-align: left;
}

.tpt-phase-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.tpt-phase-price {
    display: flex;
    align-items: baseline;
    white-space: nowrap;
}

.tpt-price-amount {
    font-size: 22px;
    font-weight: 700;
    color: #2c5aa0;
}

.tpt-price-currency {
    font-size: 14px;
    color: #666;
    margin-left: 4px;
}

.tpt-phase-dates {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.tpt-date-start,
.tpt-date-end {
    margin: 2px 0;
}

.tpt-date-start::before {
    content: '🕐 ';
    margin-right: 4px;
}

.tpt-date-end::before {
    content: '🕕 ';
    margin-right: 4px;
}

/* ==========================================================================
   Steps Style
   ========================================================================== */

.tpt-style-steps .tpt-phases-container {
    display: flex;
    align-items: center;
    position: relative;
}

.tpt-style-steps .tpt-phases-container::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.tpt-style-steps .tpt-timeline-item {
    position: relative;
    z-index: 1;
    background: transparent;
    box-shadow: none;
    border: none;
    flex: 1;
}

.tpt-style-steps .tpt-phase-marker {
    position: relative;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px #e0e0e0;
}

.tpt-style-steps .tpt-phase-past .tpt-phase-marker {
    background: #4CAF50;
    box-shadow: 0 0 0 2px #4CAF50;
}

.tpt-style-steps .tpt-phase-current .tpt-phase-marker {
    background: #2196F3;
    box-shadow: 0 0 0 2px #2196F3;
}

/* ==========================================================================
   Countdown Timer
   ========================================================================== */

.tpt-countdown-container {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-radius: 12px;
}

.tpt-countdown-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.tpt-countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tpt-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tpt-countdown-number {
    font-size: 32px;
    font-weight: 700;
    color: #2c5aa0;
    line-height: 1;
    display: block;
}

.tpt-countdown-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* ==========================================================================
   Theme Variations
   ========================================================================== */

/* Dark Theme */
.tpt-theme-dark {
    background: #1a1a1a;
    color: #fff;
}

.tpt-theme-dark .tpt-timeline-item {
    background: #2d2d2d;
    color: #fff;
}

.tpt-theme-dark .tpt-phase-name {
    color: #fff;
}

.tpt-theme-dark .tpt-countdown-container {
    background: #2d2d2d;
    border-color: #444;
}

.tpt-theme-dark .tpt-countdown-item {
    background: #3a3a3a;
    color: #fff;
    border-color: #555;
}

/* Compact Mode */
.tpt-compact .tpt-timeline-item {
    padding: 15px;
    min-width: 150px;
}

.tpt-compact .tpt-phase-name {
    font-size: 16px;
}

.tpt-compact .tpt-price-amount {
    font-size: 20px;
}

.tpt-compact .tpt-phase-dates {
    font-size: 12px;
}

/* ==========================================================================
   Responsive Adjustments with Container Queries
   ========================================================================== */

/* Styles for when the card is moderately compressed */
@container timeline-card (max-width: 210px) {
    .tpt-timeline-item {
        padding: 12px;
    }
    .tpt-phase-name {
        font-size: 13px;
    }
    .tpt-price-amount {
        font-size: 20px;
    }
    .tpt-phase-dates {
        font-size: 11px;
    }
}

/* Styles for when the card is heavily compressed */
@container timeline-card (max-width: 170px) {
    .tpt-phase-name {
        font-size: 12px;
    }
    .tpt-price-amount {
        font-size: 18px;
    }
    /* Keep price and currency on same line, just adjust sizes */
    .tpt-price-currency {
        font-size: 12px;
        margin-left: 2px; /* Reduce margin slightly */
    }
} 
