/**
 * WC Progress Goals - Classic Layout Styles
 * Layout-specific CSS for the classic progress bar design
 * 
 * @fileoverview Classic layout styling
 * @version 2.1.0
 * @author WC Progress Goals Team
 * @size ~3KB (optimized)
 */

/* ==========================================================================
   Classic Layout Specific Styles
   ========================================================================== */

.wcpg-layout-classic {
    /* Classic layout container */
    position: relative;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wcpg-layout-classic .wcpg-progress-bar {
    /* Classic progress bar styling */
    position: relative;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: visible;
    margin: 10px 0 30px 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.wcpg-layout-classic .wcpg-progress-fill {
    /* Classic progress fill */
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.wcpg-layout-classic .wcpg-progress-fill::after {
    /* Classic progress fill shine effect */
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: wcpg-classic-shine 2s infinite;
}

@keyframes wcpg-classic-shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.wcpg-layout-classic .wcpg-progress-fill.wcpg-animating {
    /* Animation state */
    animation: wcpg-classic-pulse 0.5s ease-out;
}

@keyframes wcpg-classic-pulse {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(1.1); }
    100% { transform: scaleY(1); }
}

/* ==========================================================================
   Classic Milestones
   ========================================================================== */

.wcpg-layout-classic .wcpg-milestones {
    /* Milestones container */
    position: relative;
    height: 0;
    width: 100%;
}

.wcpg-layout-classic .wcpg-milestone {
    /* Individual milestone */
    position: absolute;
    top: -5px;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.wcpg-layout-classic .wcpg-milestone-icon {
    /* Milestone icon/number */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wcpg-layout-classic .wcpg-milestone.reached .wcpg-milestone-icon {
    /* Reached milestone styling */
    background: #4CAF50;
    border-color: #45a049;
    color: #fff;
    transform: scale(1.1);
}

.wcpg-layout-classic .wcpg-milestone:hover .wcpg-milestone-icon {
    /* Hover effect */
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.wcpg-layout-classic .wcpg-milestone-label {
    /* Milestone label */
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
}

.wcpg-layout-classic .wcpg-milestone-value {
    /* Milestone value */
    position: absolute;
    top: 55px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: bold;
    color: #4CAF50;
    white-space: nowrap;
}

.wcpg-layout-classic .wcpg-milestone.reached .wcpg-milestone-value {
    /* Reached milestone value */
    color: #45a049;
}

/* ==========================================================================
   Classic Tooltips
   ========================================================================== */

.wcpg-layout-classic .wcpg-tooltip {
    /* Tooltip styling */
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wcpg-layout-classic .wcpg-tooltip::after {
    /* Tooltip arrow */
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.wcpg-layout-classic .wcpg-milestone:hover .wcpg-tooltip {
    /* Show tooltip on hover */
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Classic Progress Text
   ========================================================================== */

.wcpg-layout-classic .wcpg-progress-text {
    /* Progress text styling */
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.wcpg-layout-classic .wcpg-congratulations-text {
    /* Congratulations message */
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
}

/* ==========================================================================
   Classic Animations
   ========================================================================== */

.wcpg-layout-classic .wcpg-milestone-reached-animation {
    /* Milestone reached animation */
    animation: wcpg-classic-milestone-reached 0.6s ease-out;
}

@keyframes wcpg-classic-milestone-reached {
    0% {
        transform: translateX(-50%) scale(1);
    }
    25% {
        transform: translateX(-50%) scale(1.3);
    }
    50% {
        transform: translateX(-50%) scale(1.1) rotate(5deg);
    }
    75% {
        transform: translateX(-50%) scale(1.2) rotate(-5deg);
    }
    100% {
        transform: translateX(-50%) scale(1);
    }
}

/* ==========================================================================
   Classic Responsive Design
   ========================================================================== */

/* Tablet styles */
@media (max-width: 768px) {
    .wcpg-layout-classic {
        padding: 12px;
        margin: 15px 0;
    }
    
    .wcpg-layout-classic .wcpg-milestone-icon {
        width: 25px;
        height: 25px;
        font-size: 10px;
    }
    
    .wcpg-layout-classic .wcpg-milestone-label {
        font-size: 10px;
        top: 30px;
    }
    
    .wcpg-layout-classic .wcpg-milestone-value {
        font-size: 9px;
        top: 45px;
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    .wcpg-layout-classic {
        padding: 10px;
        margin: 10px 0;
    }
    
    .wcpg-layout-classic .wcpg-progress-bar {
        height: 15px;
        margin: 8px 0 25px 0;
    }
    
    .wcpg-layout-classic .wcpg-milestone-icon {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
    
    .wcpg-layout-classic .wcpg-milestone-label {
        font-size: 9px;
        top: 25px;
    }
    
    .wcpg-layout-classic .wcpg-milestone-value {
        font-size: 8px;
        top: 38px;
    }
    
    .wcpg-layout-classic .wcpg-progress-text {
        font-size: 12px;
        margin-top: 10px;
    }
}

/* Compact mode for very small containers */
.wcpg-layout-classic.wcpg-compact .wcpg-milestone-label,
.wcpg-layout-classic.wcpg-compact .wcpg-milestone-value {
    display: none;
}

.wcpg-layout-classic.wcpg-compact .wcpg-milestone-icon {
    width: 18px;
    height: 18px;
    font-size: 8px;
}

/* ==========================================================================
   Classic Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .wcpg-layout-classic {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .wcpg-layout-classic .wcpg-progress-bar {
        background: #444;
    }
    
    .wcpg-layout-classic .wcpg-milestone-icon {
        background: #333;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .wcpg-layout-classic .wcpg-milestone.reached .wcpg-milestone-icon {
        background: #4CAF50;
        border-color: #45a049;
    }
    
    .wcpg-layout-classic .wcpg-milestone-label {
        background: rgba(42, 42, 42, 0.9);
        border-color: #555;
        color: #e0e0e0;
    }
    
    .wcpg-layout-classic .wcpg-progress-text {
        color: #e0e0e0;
    }
}

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

@media print {
    .wcpg-layout-classic {
        background: #fff !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .wcpg-layout-classic .wcpg-progress-fill {
        background: #000 !important;
    }
    
    .wcpg-layout-classic .wcpg-milestone-icon {
        background: #fff !important;
        border-color: #000 !important;
        color: #000 !important;
    }
    
    .wcpg-layout-classic .wcpg-milestone.reached .wcpg-milestone-icon {
        background: #000 !important;
        color: #fff !important;
    }
    
    .wcpg-layout-classic .wcpg-tooltip {
        display: none !important;
    }
}

/* ==========================================================================
   Classic Accessibility
   ========================================================================== */

.wcpg-layout-classic .wcpg-milestone:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.wcpg-layout-classic .wcpg-milestone:focus .wcpg-milestone-icon {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .wcpg-layout-classic {
        border-width: 2px;
    }
    
    .wcpg-layout-classic .wcpg-progress-bar {
        border: 1px solid #000;
    }
    
    .wcpg-layout-classic .wcpg-milestone-icon {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wcpg-layout-classic .wcpg-progress-fill,
    .wcpg-layout-classic .wcpg-milestone,
    .wcpg-layout-classic .wcpg-milestone-icon,
    .wcpg-layout-classic .wcpg-tooltip {
        transition: none !important;
        animation: none !important;
    }
    
    .wcpg-layout-classic .wcpg-progress-fill::after {
        display: none;
    }
}