/**
 * FH Orígenes Envíos Cart - Progress Bar Styles
 *
 * @package FH_Origenes_Envios_Cart
 */

/* Main wrapper */
.fh-oec-progress-wrapper {
    width: 100%;
    max-width: 100%;
    padding: var(--fh-oec-wrapper-padding, 15px);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Message text */
.fh-oec-message {
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
    /* Margin to accommodate markers if on top */
    color: #333;
    font-weight: 500;
}

/* Bar container - uses CSS variables */
.fh-oec-bar-container {
    position: relative;
    width: 100%;
    height: var(--fh-oec-bar-height, 24px) !important;
    /* Force override for specificity issues */
    border-radius: var(--fh-oec-bar-height, 24px);
    overflow: visible;
    background-color: var(--fh-oec-color-background, #E0E0E0);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Progress fill - uses CSS variables */
.fh-oec-bar-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: var(--fh-oec-bar-height, 24px) 0 0 var(--fh-oec-bar-height, 24px);
    background-color: var(--fh-oec-color-active, #00B4D8);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align amount to the right of the bar */
    min-width: 40px;
    /* Reduced min width */
    transition: width 0.4s ease-out;
    z-index: 5;
}

/* Hide amount when bar is too short */
.fh-oec-bar-progress.fh-oec-hide-amount .fh-oec-bar-amount {
    display: none;
}

/* When 100% complete */
.fh-oec-progress-wrapper[data-state="3"] .fh-oec-bar-progress {
    border-radius: var(--fh-oec-bar-height, 24px);
}

/* Amount inside bar */
.fh-oec-bar-amount {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    padding: 0 8px;
}

/* Milestones General */
.fh-oec-milestone {
    position: absolute;
    top: var(--fh-oec-milestone-top, 50%);
    transform: translate(-50%, var(--fh-oec-transform-y, -50%));
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Type: Line (Default) */
.fh-oec-milestone.type-line {
    width: 3px;
    height: calc(100% + 8px);
    background-color: #fff;
    border-left: 2px solid var(--fh-oec-color-milestones, #666666);
    border-right: 2px solid var(--fh-oec-color-milestones, #666666);
    border-radius: 2px;
    top: 50%;
    transform: translate(-50%, -50%);
    /* Always centered for lines */
}

/* Type: Emoji & Image */
.fh-oec-milestone.type-emoji,
.fh-oec-milestone.type-image {
    width: 32px;
    height: 32px;
    background: transparent;
    /* Removed default border/shadow for clearer custom look, unless user wants circle */
}

.fh-oec-milestone.type-emoji.completed,
.fh-oec-milestone.type-image.completed {
    transform: translate(-50%, var(--fh-oec-transform-y, -50%)) scale(1.1);
}

.fh-oec-milestone-emoji {
    font-size: 24px;
    line-height: 1;
}

.fh-oec-milestone-image {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* Completed Line */
.fh-oec-milestone.type-line.completed {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

/* Second milestone at the end */
.fh-oec-milestone-2 {
    /* Position handled by inline style from PHP */
}

/* Shortcode wrapper */
.fh-oec-shortcode-wrapper {
    margin: 15px 0;
}

/* Mini-cart wrapper adjustments */
.fh-oec-mini-cart-wrapper .fh-oec-bar-container,
.fh-oec-mini-cart-top-wrapper .fh-oec-bar-container {
    /* Height handled by variable now based on user setting */
    margin-top: 10px;
    margin-bottom: 10px;
}