/**
 * Frontend Styles for WC Progress Goals
 */

.wcpg-progress-container {
    margin: 20px 0;
    font-family: inherit;
    clear: both;
}

.wcpg-progress-bar {
    position: relative;
    overflow: visible;
    margin: 50px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wcpg-progress-fill {
    height: 100%;
    position: relative;
    z-index: 1;
    transition: width 0.5s ease;
}

.wcpg-milestones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.wcpg-milestone {
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    text-align: center;
    cursor: pointer;
}

.wcpg-milestone-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 5px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wcpg-milestone.reached .wcpg-milestone-icon {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
    transform: scale(1.1);
}

.wcpg-milestone:hover .wcpg-milestone-icon {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.wcpg-milestone-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    color: #333;
}

.wcpg-milestone-value {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
}

.wcpg-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

/* Icon Position Styles */
.wcpg-milestone.wcpg-icon-top {
    transform: translateX(-50%) translateY(-120%);
}

.wcpg-milestone.wcpg-icon-center {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-milestone.wcpg-icon-bottom {
    transform: translateX(-50%) translateY(20%);
}

/* Last milestone positioning - prevent overflow with specific selectors */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child {
    transform: translateX(-100%) translateY(-50%);
}

/* Last milestone with icon positions */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-top {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-center {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-bottom {
    transform: translateX(-100%) translateY(-50%);
}

/* Last milestone with label positions */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-label-above {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-label-below {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-label-side {
    transform: translateX(-100%) translateY(-50%);
}

/* Last milestone with combined icon and label positions */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-top.wcpg-label-above {
    transform: translateX(-100%) translateY(-25%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-top.wcpg-label-below {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-top.wcpg-label-side {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-bottom.wcpg-label-above {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-bottom.wcpg-label-below {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-bottom.wcpg-label-side {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-center.wcpg-label-above {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-center.wcpg-label-below {
    transform: translateX(-100%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-icon-center.wcpg-label-side {
    transform: translateX(-100%) translateY(-50%);
}

/* Right-align labels for last milestone */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child .wcpg-milestone-label,
.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child .wcpg-milestone-value {
    text-align: right;
}

/* Exception for side labels - keep left alignment */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-label-side .wcpg-milestone-label,
.wcpg-progress-container .wcpg-milestones .wcpg-milestone:last-child.wcpg-label-side .wcpg-milestone-value {
    text-align: left;
}

/* Adjust milestone labels and values based on icon position */
.wcpg-milestone.wcpg-icon-top .wcpg-milestone-label,
.wcpg-milestone.wcpg-icon-top .wcpg-milestone-value {
    margin-top: 35px;
}

.wcpg-milestone.wcpg-icon-bottom .wcpg-milestone-label,
.wcpg-milestone.wcpg-icon-bottom .wcpg-milestone-value {
    margin-top: -25px;
    margin-bottom: 35px;
}

/* Label Position Styles - Simplified for conditional template structure */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone .wcpg-milestone-icon {
    margin: 5px 0;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone .wcpg-milestone-label {
    margin: 3px 0;
    text-align: center;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone .wcpg-milestone-value {
    margin: 3px 0;
    text-align: center;
}

/* Label above positioning */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-above {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Label below positioning */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-below {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Side label positioning */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-side .wcpg-milestone-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-side .wcpg-milestone-icon {
    margin: 0;
    flex-shrink: 0;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-side .wcpg-milestone-label {
    margin: 0 0 2px 0;
    text-align: left;
    white-space: nowrap;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-side .wcpg-milestone-value {
    margin: 0;
    text-align: left;
    white-space: nowrap;
}

/* Custom positioning adjustments for label positions */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-above {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-side {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-below {
    transform: translateX(-50%) translateY(-50%);
}

/* Adjust for icon positions combined with label positions */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-top.wcpg-label-above {
    transform: translateX(-50%) translateY(-25%);
}

/* Enhanced milestone icon positioning for better control */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone .wcpg-milestone-icon {
    position: relative;
    z-index: 2;
    /* Base positioning - can be overridden for specific combinations */
}

/* Specific icon positioning adjustments */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-top .wcpg-milestone-icon {
    /* Icon positioned above progress line for icon-top */
    top: -5px;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-top.wcpg-label-below {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-top.wcpg-label-side {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-bottom.wcpg-label-above {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-bottom.wcpg-label-below {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-bottom.wcpg-label-side {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-center.wcpg-label-above {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-center.wcpg-label-below {
    transform: translateX(-50%) translateY(-50%);
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-center.wcpg-label-side {
    transform: translateX(-50%) translateY(-50%);
}

/* Dynamic label styling from settings */
.wcpg-milestone-label,
.wcpg-milestone-value {
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Icon center positioning - keep icon on progress bar line */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-icon-center .wcpg-milestone-icon {
    position: relative;
    z-index: 2;
}

/* Label above positioning - move label and value above icon */
/* Note: top values are now controlled by admin settings and generated dynamically */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-above .wcpg-milestone-label {
    position: relative;
    /* top: controlled by settings */
    margin-bottom: -20px;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-above .wcpg-milestone-value {
    position: relative;
    /* top: controlled by settings */
    margin-top: -10px;
}

/* Label below positioning - move label and value below icon */
.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-below .wcpg-milestone-label {
    position: relative;
    top: 25px;
    margin-top: -10px;
}

.wcpg-progress-container .wcpg-milestones .wcpg-milestone.wcpg-label-below .wcpg-milestone-value {
    position: relative;
    top: 35px;
    margin-top: -15px;
}

.wcpg-tooltip {
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 300px;
    white-space: normal;
    text-align: center;
    min-width: 150px;
}

.wcpg-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.wcpg-milestone:hover .wcpg-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.wcpg-progress-values {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 14px;
    padding: 10px 0;
    /*border-top: 1px solid #eee; */
}

.wcpg-current-value,
.wcpg-max-value {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wcpg-progress-values .wcpg-label {
    color: #666;
    font-size: 12px;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcpg-progress-values .wcpg-amount {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.wcpg-next-milestone,
.wcpg-completed {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.wcpg-next-milestone {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 1px solid #b3d9ff;
    color: #0066cc;
}

.wcpg-completed {
    background: linear-gradient(135deg, #f0fff0 0%, #e6ffe6 100%);
    border: 1px solid #b3ffb3;
    color: #006600;
}

.wcpg-remaining-text,
.wcpg-completed-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.wcpg-default-marker {
    font-size: 16px;
    color: inherit;
}

/* Animation for progress fill */
@keyframes fillProgress {
    from {
        width: 0;
    }
    to {
        width: var(--progress-width);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom positioning utility classes */
.wcpg-progress-container.wcpg-custom-positioning .wcpg-milestone .wcpg-milestone-label,
.wcpg-progress-container.wcpg-custom-positioning .wcpg-milestone .wcpg-milestone-value {
    position: relative;
    z-index: 10;
}

/* Prevent layout interference with other page elements */
.wcpg-progress-container {
    isolation: isolate;
    contain: layout style;
}

.wcpg-progress-container .wcpg-milestones {
    contain: layout;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wcpg-progress-container {
        margin: 15px 0;
    }
    
    .wcpg-milestone-label,
    .wcpg-milestone-value {
        font-size: 10px;
    }
    
    .wcpg-milestone-icon {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .wcpg-progress-values {
        font-size: 12px;
        flex-direction: column;
        gap: 10px;
    }
    
    .wcpg-current-value,
    .wcpg-max-value {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .wcpg-progress-values .wcpg-label {
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .wcpg-tooltip {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 150px;
    }
    
    .wcpg-next-milestone,
    .wcpg-completed {
        padding: 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .wcpg-milestone-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .wcpg-milestone-label {
        font-size: 9px;
    }
    
    .wcpg-milestone-value {
        font-size: 8px;
    }
    
    .wcpg-progress-bar {
        margin: 20px 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wcpg-milestone-icon {
        background: #2a2a2a;
        border-color: #555;
        color: #ccc;
    }
    
    .wcpg-milestone-label {
        color: #ccc;
    }
    
    .wcpg-milestone-value {
        color: #999;
    }
    
    .wcpg-progress-values {
        border-top-color: #444;
    }
    
    .wcpg-progress-values .wcpg-label {
        color: #999;
    }
    
    .wcpg-progress-values .wcpg-amount {
        color: #ccc;
    }
    
    .wcpg-next-milestone {
        background: linear-gradient(135deg, #1a2332 0%, #243447 100%);
        border-color: #3a5a7a;
        color: #66b3ff;
    }
    
    .wcpg-completed {
        background: linear-gradient(135deg, #1a2e1a 0%, #2a4a2a 100%);
        border-color: #4a7a4a;
        color: #66ff66;
    }
}

/* Print styles */
@media print {
    .wcpg-progress-container {
        break-inside: avoid;
    }
    
    .wcpg-tooltip {
        display: none;
    }
    
    .wcpg-milestone-icon {
        box-shadow: none;
    }
}

/* Progress Info Styles */
.wcpg-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

.wcpg-values {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wcpg-current {
    font-weight: 600;
    color: #4CAF50;
}

.wcpg-separator {
    color: #666;
}

.wcpg-target {
    font-weight: 500;
    color: #666;
}

.wcpg-percentage {
    font-weight: 600;
    color: #4CAF50;
    font-size: 16px;
}

.wcpg-milestone-message {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #4CAF50;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
}

/* Builder Preview Specific Styles */
.wcpg-builder-preview {
    min-height: 60px;
}

.wcpg-builder-preview .wcpg-progress-bg {
    background-color: #e0e0e0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.wcpg-builder-preview .wcpg-progress-fill {
    background-color: #4CAF50;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .wcpg-milestone-icon {
        border-width: 3px;
    }
    
    .wcpg-milestone.reached .wcpg-milestone-icon {
        background: #000;
        border-color: #000;
        color: #fff;
    }
    
    .wcpg-tooltip {
        background: #000;
        border: 2px solid #fff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wcpg-progress-fill,
    .wcpg-milestone-icon,
    .wcpg-tooltip {
        transition: none;
    }
    
    .wcpg-next-milestone,
    .wcpg-completed {
        animation: none;
    }
}

/* Mobile-Specific Layout Styles */
.wcpg-progress-container.wcpg-mobile-layout {
    margin: 15px 0;
    padding: 0 10px;
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-progress-bar {
    margin: 30px 0;
    position: relative;
}

/* Mobile milestone container - simplified layout */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-mobile-milestones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Mobile milestone styling - clean and non-overlapping */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone {
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    text-align: center;
    cursor: pointer;
    min-width: 60px;
}

/* Constant milestone (first milestone) styling */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-constant-milestone {
    z-index: 3;
}

/* Dynamic milestone (upcoming milestone) styling */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-dynamic-milestone {
    z-index: 2;
}

/* Mobile milestone icons - larger for touch */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone.reached .wcpg-milestone-icon {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
    transform: scale(1.05);
}

/* Mobile milestone info container */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-mobile-milestone-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 4px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    min-width: 50px;
}

/* Mobile milestone labels */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone-label {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone-value {
    font-size: 10px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

/* Hide mobile milestone labels when setting is enabled */
.wcpg-progress-container.wcpg-mobile-layout.wcpg-hide-mobile-labels .wcpg-milestone-label,
.wcpg-progress-container.wcpg-mobile-layout.wcpg-hide-mobile-labels .wcpg-milestone-value {
    display: none !important;
}

.wcpg-progress-container.wcpg-mobile-layout.wcpg-hide-mobile-labels .wcpg-mobile-milestone-info {
    display: none !important;
}

/* Hide mobile next milestone and completion text when setting is enabled */
.wcpg-progress-container.wcpg-mobile-layout.wcpg-hide-mobile-labels .wcpg-mobile-next,
.wcpg-progress-container.wcpg-mobile-layout.wcpg-hide-mobile-labels .wcpg-mobile-completed,
.wcpg-progress-container.wcpg-mobile-layout.wcpg-hide-mobile-labels .wcpg-remaining-text,
.wcpg-progress-container.wcpg-mobile-layout.wcpg-hide-mobile-labels .wcpg-completed-text {
    display: none !important;
}

/* Mobile progress values - simplified layout */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-mobile-values {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
    padding: 8px 0;
    gap: 15px;
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-current-value,
.wcpg-progress-container.wcpg-mobile-layout .wcpg-next-value {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-mobile-values .wcpg-label {
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-mobile-values .wcpg-amount {
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

/* Mobile next milestone info */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-mobile-next {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 1px solid #b3d9ff;
    color: #0066cc;
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-mobile-completed {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    background: linear-gradient(135deg, #f0fff0 0%, #e6ffe6 100%);
    border: 1px solid #b3ffb3;
    color: #006600;
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-remaining-text,
.wcpg-progress-container.wcpg-mobile-layout .wcpg-completed-text {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}

/* Mobile tooltips - positioned better for touch */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    max-width: 200px;
    white-space: normal;
    text-align: center;
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone:hover .wcpg-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-3px);
}

/* Prevent milestone overlap on mobile */
.wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone:first-child {
    min-width: 70px;
}

.wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone:last-child {
    min-width: 70px;
    transform: translateX(-100%) translateY(-50%);
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) {
    .wcpg-progress-container.wcpg-mobile-layout .wcpg-mobile-milestone-info {
        background: rgba(42, 42, 42, 0.95);
        border-color: #555;
    }
    
    .wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone-label {
        color: #ccc;
    }
    
    .wcpg-progress-container.wcpg-mobile-layout .wcpg-milestone-value {
        color: #999;
    }
    
    .wcpg-progress-container.wcpg-mobile-layout .wcpg-mobile-values .wcpg-amount {
        color: #ccc;
    }
}
