/**
 * Public styles for Sticky Coupon Bar for WooCommerce
 */

/* Base styles for the coupon bar */
.sticky-coupon-bar {
    position: fixed;
    width: 100%;
    left: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.4;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Position variants */
.sticky-coupon-bar-top {
    top: 0;
}

.sticky-coupon-bar-bottom {
    bottom: 0;
}

/* Push down admin bar on top position */
body.admin-bar .sticky-coupon-bar-top {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .sticky-coupon-bar-top {
        top: 46px;
    }
}

/* Style variants */
.sticky-coupon-bar-light {
    background-color: #f8f8f8;
    color: #333333;
    border-bottom: 1px solid #e0e0e0;
}

.sticky-coupon-bar-dark {
    background-color: #333333;
    color: #ffffff;
}

.sticky-coupon-bar-custom {
    color: #ffffff;
}

/* Content structure */
.sticky-coupon-bar-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    gap: 15px;
}

/* Message styling */
.sticky-coupon-bar-message {
    font-weight: 500;
}

/* Coupon code styling */
.sticky-coupon-code {
    display: inline-block;
    padding: 3px 8px;
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    margin: 0 5px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.sticky-coupon-bar-light .sticky-coupon-code {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Close button */
.sticky-coupon-bar-close {
    margin-left: 15px;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.sticky-coupon-bar-close:hover {
    opacity: 1;
    color: inherit;
}

/* Copy button */
.sticky-coupon-copy-button {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    line-height: 1;
}

.sticky-coupon-bar-light .sticky-coupon-copy-button {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.sticky-coupon-copy-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.sticky-coupon-bar-light .sticky-coupon-copy-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Countdown timer */
.sticky-coupon-countdown {
    display: flex;
    align-items: center;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 4px 10px;
    border-radius: 3px;
}

.sticky-coupon-bar-light .sticky-coupon-countdown {
    background-color: rgba(0, 0, 0, 0.05);
}

.sticky-coupon-bar-dark .sticky-coupon-countdown {
    background-color: rgba(255, 255, 255, 0.1);
}

.countdown-label {
    margin-right: 10px;
    font-size: 13px;
    opacity: 0.9;
}

.countdown-days,
.countdown-hours,
.countdown-minutes,
.countdown-seconds {
    display: inline-block;
    min-width: 24px;
    text-align: center;
}

.countdown-separator {
    opacity: 0.7;
    margin: 0 2px;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .sticky-coupon-bar {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .sticky-coupon-countdown {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .countdown-label {
        display: none;
    }
}