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

/* ==========================================================================
   Tablet Styles (768px - 1024px)
   ========================================================================== */

@media screen and (max-width: 1024px) {
    .tpt-timeline-container {
        padding: 15px;
    }
    
    .tpt-event-title h3 {
        font-size: 24px;
    }
    
    .tpt-phases-container {
        gap: 15px;
    }
    
    .tpt-timeline-item {
        min-width: 180px;
        padding: 18px;
    }
    
    .tpt-phase-name {
        font-size: 16px;
    }
    
    .tpt-price-amount {
        font-size: 20px;
    }
    
    .tpt-countdown {
        gap: 15px;
    }
    
    .tpt-countdown-item {
        min-width: 70px;
        padding: 12px;
    }
    
    .tpt-countdown-number {
        font-size: 28px;
    }
}

/* ==========================================================================
   Mobile Styles (768px and below)
   ========================================================================== */

@media screen and (max-width: 768px) {
    .tpt-timeline-container {
        padding: 10px;
    }
    
    .tpt-event-title {
        margin-bottom: 20px;
    }
    
    .tpt-event-title h3 {
        font-size: 20px;
    }
    
    .tpt-event-description {
        font-size: 14px;
    }
    
    /* Hide horizontal progress bar on mobile */
    .tpt-progress-container {
        display: none;
    }
    
    /* Mobile: Stack phases vertically */
    .tpt-phases-container {
        flex-direction: column;
        gap: 15px;
        position: relative;
    }
    
    /* Create vertical progress line for mobile */
    .tpt-phases-container::before {
        content: '';
        position: absolute;
        left: 20px;
        top: 20px;
        bottom: 20px;
        width: 4px;
        background: linear-gradient(to bottom, #4CAF50 0%, #4CAF50 var(--progress-height, 0%), #e0e0e0 var(--progress-height, 0%), #e0e0e0 100%);
        border-radius: 2px;
        z-index: 0;
    }
    
    .tpt-timeline-item {
        min-width: 100%;
        margin: 0;
        padding: 15px 15px 15px 50px; /* Add left padding for the vertical line */
        position: relative;
        z-index: 1;
    }
    
    .tpt-phase-marker {
        position: absolute;
        left: 12px; /* Position on the vertical line */
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        z-index: 2;
    }
    
    .tpt-phase-marker::before {
        width: 8px;
        height: 8px;
    }
    
    .tpt-phase-content {
        margin-left: 40px; /* Push content further to the right on mobile */
    }
    
    .tpt-phase-name {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .tpt-price-amount {
        font-size: 18px;
    }
    
    .tpt-phase-dates {
        font-size: 12px;
    }
    
    /* Hide the desktop progress bar elements on mobile */
    .tpt-current-phase-badge {
        display: none;
    }
    
    /* Progress bar adjustments for mobile - kept for compatibility but hidden */
    .tpt-progress-bar {
        height: 6px;
    }
    
    /* Countdown adjustments for mobile */
    .tpt-countdown-container {
        margin-top: 20px;
        padding: 15px;
    }
    
    .tpt-countdown-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .tpt-countdown {
        gap: 10px;
    }
    
    .tpt-countdown-item {
        min-width: 60px;
        padding: 10px 8px;
    }
    
    .tpt-countdown-number {
        font-size: 24px;
    }
    
    .tpt-countdown-label {
        font-size: 10px;
    }
    
    /* Steps style mobile adjustments */
    .tpt-style-steps .tpt-phases-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tpt-style-steps .tpt-phases-container::before {
        display: none;
    }
    
    .tpt-style-steps .tpt-timeline-item {
        display: flex;
        align-items: center;
        padding: 15px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        border: 2px solid transparent;
    }
    
    .tpt-style-steps .tpt-phase-marker {
        width: 30px;
        height: 30px;
        margin: 0 15px 0 0;
        flex-shrink: 0;
    }
    
    .tpt-style-steps .tpt-phase-content {
        text-align: left;
        flex: 1;
    }
}

/* ==========================================================================
   Small Mobile Styles (480px and below)
   ========================================================================== */

@media screen and (max-width: 480px) {
    .tpt-timeline-container {
        padding: 8px;
    }
    
    .tpt-event-title h3 {
        font-size: 18px;
    }
    
    .tpt-timeline-item {
        padding: 12px;
    }
    
    .tpt-phase-name {
        font-size: 14px;
    }
    
    .tpt-price-amount {
        font-size: 16px;
    }
    
    .tpt-phase-dates {
        font-size: 11px;
    }
    
    .tpt-countdown-item {
        min-width: 50px;
        padding: 8px 6px;
    }
    
    .tpt-countdown-number {
        font-size: 20px;
    }
    
    .tpt-countdown-label {
        font-size: 9px;
    }
}

/* ==========================================================================
   Touch Device Optimizations
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    .tpt-timeline-item:hover {
        transform: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    .tpt-timeline-item {
        cursor: default;
    }
    
    /* Larger touch targets */
    .tpt-timeline-item {
        min-height: 120px;
    }
    
    .tpt-countdown-item {
        min-height: 80px;
    }
}

/* ==========================================================================
   High DPI / Retina Displays
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tpt-phase-marker::before {
        border-radius: 50%;
    }
    
    .tpt-progress-fill::after {
        background-size: 10px 10px;
    }
}

/* ==========================================================================
   Landscape Orientation on Mobile
   ========================================================================== */

@media screen and (max-width: 768px) and (orientation: landscape) {
    .tpt-phases-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .tpt-timeline-item {
        min-width: calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    
    .tpt-countdown {
        flex-wrap: nowrap;
        justify-content: space-around;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .tpt-timeline-container {
        padding: 0;
        max-width: none;
    }
    
    .tpt-timeline-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .tpt-countdown-container {
        display: none;
    }
    
    .tpt-progress-fill::after {
        display: none;
    }
    
    .tpt-phase-current {
        animation: none;
    }
    
    .tpt-phase-current .tpt-phase-marker {
        animation: none;
    }
    
    .tpt-progress-fill::after {
        animation: none;
    }
} 