/**
 * Copyright © MpdExtensions, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

.estimated-delivery-date-product,
.estimated-delivery-date-cart-item,
.estimated-delivery-date-order-item {
    margin: 10px 0;
}

/* Cart Item Delivery Date Styling */
.estimated-delivery-date-cart-item {
    margin: 10px 0 0 0;
    clear: both;
}

.estimated-delivery-date-message-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.estimated-delivery-date-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #28a745;
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1;
}

.estimated-delivery-date-text {
    flex: 1;
}

.estimated-delivery-date-message {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    margin: 15px 0;
}

.estimated-delivery-date-message.loading {
    opacity: 0.6;
    position: relative;
}

.estimated-delivery-date-message.loading::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.estimated-delivery-date-admin-item {
    margin: 5px 0;
    padding: 5px;
    background-color: #f9f9f9;
}

.estimated-delivery-date-email {
    width: 100%;
    margin: 10px 0;
}

.estimated-delivery-date-email td {
    padding: 5px;
}

/* Graphic Countdown Styles */
.estimated-delivery-countdown-graphic-container {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
    border: none;
    outline: none;
    box-shadow: none;
}

.countdown-unit-circle {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
    vertical-align: middle;
    border: none;
    outline: none;
    box-shadow: none;
}

.countdown-unit-circle .countdown-circle {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    border: none;
    outline: none;
}

.countdown-unit-circle:focus,
.countdown-unit-circle:focus-visible,
.countdown-unit-circle:active {
    outline: none;
    border: none;
    box-shadow: none;
}

.countdown-unit-circle .countdown-circle-bg {
    stroke: #d4edda;
    fill: none;
    stroke-width: 4;
    opacity: 1;
}

.countdown-unit-circle .countdown-circle-progress {
    stroke: #155724;
    fill: none;
    stroke-width: 4;
    transition: stroke-dashoffset 0.5s ease;
    stroke-linecap: round;
    opacity: 1;
}

.countdown-unit-circle .countdown-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    pointer-events: none;
}

.countdown-unit-circle .countdown-value {
    font-size: 24px;
    font-weight: bold;
    color: #155724;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.countdown-unit-circle .countdown-label {
    font-size: 11px;
    color: #155724;
    text-transform: lowercase;
    margin-top: 2px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* Inline countdown styling */
.estimated-delivery-countdown {
    display: inline-block;
    vertical-align: middle;
}

/* Ensure countdown element is visible once initialized */
.estimated-delivery-date-message .estimated-delivery-countdown {
    visibility: visible !important;
}
