/**
 * Cylocybe Bundle Promo Manager - Frontend Styles
 *
 * @package Cylocybe_Promo_Manager
 */

/* Selection Bundle Dropdowns */
.cylocybe-bundle-selections {
    margin-bottom: 20px;
}

.cylocybe-bundle-selections .form-row {
    margin-bottom: 15px;
}

.cylocybe-bundle-selections label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.cylocybe-bundle-selections select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cylocybe-bundle-selections select:focus {
    border-color: #0073aa;
    outline: none;
}

.cylocybe-bundle-selections select:invalid,
.cylocybe-bundle-selections select.error {
    border-color: #e2401c;
}

.cylocybe-no-stock {
    color: #e2401c;
    font-weight: 600;
}

/* Bundle Progress Indicator */
.cylocybe-bundle-progress {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cylocybe-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.cylocybe-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5cb85c, #4cae4c);
    transition: width 0.3s;
}

.cylocybe-progress-text {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: #333;
    text-align: center;
}

/* Cart Bundle Popup */
.cylocybe-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cylocybe-popup {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 450px;
    text-align: center;
    position: relative;
    animation: cylocybePopupIn 0.3s ease;
}

@keyframes cylocybePopupIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cylocybe-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.cylocybe-popup-close:hover {
    color: #333;
}

.cylocybe-popup h2 {
    margin: 0 0 15px 0;
    color: #333;
}

.cylocybe-popup p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.6;
}

.cylocybe-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cylocybe-popup-actions button {
    padding: 12px 25px;
    cursor: pointer;
}

.cylocybe-popup-accept {
    background: #5cb85c !important;
    border-color: #5cb85c !important;
    color: #fff !important;
}

.cylocybe-popup-accept:hover {
    background: #4cae4c !important;
    border-color: #4cae4c !important;
}

/* Free Delivery Notice - Rainbow Bar */
.cylocybe-free-delivery-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.cylocybe-free-delivery-bar {
    display: inline-block;
    height: 30px;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
    background: linear-gradient(90deg,
        hsl(0, 100%, 50%),
        hsl(60, 100%, 50%),
        hsl(120, 100%, 50%),
        hsl(180, 100%, 50%),
        hsl(240, 100%, 50%),
        hsl(300, 100%, 50%),
        hsl(360, 100%, 50%)
    );
    background-size: 400% 100%;
    animation: cylocybeRainbowSlide 32s linear infinite;
}

@keyframes cylocybeRainbowSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

.cylocybe-fd-text {
    display: flex;
    align-items: center;
    height: 30px;
    padding: 0 15px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Compact version for mini cart */
.cylocybe-free-delivery-wrapper.cylocybe-compact {
    margin: 10px 0;
}

.cylocybe-free-delivery-bar.cylocybe-compact {
    height: 24px;
}

.cylocybe-compact .cylocybe-fd-text {
    height: 24px;
    font-size: 11px;
    padding: 0 10px;
}
