/**
 * WP ScarcityJet Frontend Styles
 *
 * @package WP_ScarcityJet
 * @since 1.0.0
 */

/* Base Timer Styles */
.wp-scarcityjet-timer {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Timer Headline Styles */
.timer-headline {
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.timer-headline.headline-small {
    font-size: 14px;
}

.timer-headline.headline-medium {
    font-size: 18px;
}

.timer-headline.headline-large {
    font-size: 24px;
}

.timer-headline.headline-xlarge {
    font-size: 32px;
}

/* Sticky Timer Styles */
.wp-scarcityjet-timer.sticky-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    margin: 0;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.wp-scarcityjet-timer.sticky-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    margin: 0;
    border-radius: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

/* Flip Style Timer - New Slide-Down Version */
.timer-flip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.timer-flip-card {
    position: relative;
    width: 60px;
    height: 40px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
}

.timer-flip-number {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.timer-flip-number.current {
    transform: translateY(0);
}

.timer-flip-number.next {
    transform: translateY(100%);
}

.timer-flip-card.sliding .timer-flip-number.current {
    transform: translateY(-100%);
}

.timer-flip-card.sliding .timer-flip-number.next {
    transform: translateY(0);
}

.timer-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
    transition: opacity 0.3s ease;
}

.timer-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-top: 0;
    line-height: 1;
}

/* Digital Style Timer */
.timer-digital {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.timer-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.timer-separator {
    font-size: 2rem;
    font-weight: bold;
    opacity: 0.5;
    margin: 0 5px;
}

/* Minimal Style Timer */
.timer-minimal {
    padding: 15px;
}

.timer-text {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Circular Style Timer */
.timer-circular {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.timer-circle-unit {
    position: relative;
    display: inline-block;
    text-align: center;
}

.timer-circle {
    width: 100px;
    height: 100px;
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.timer-circle-progress {
    fill: none;
    stroke: currentColor;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.timer-circular-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.timer-circular .timer-number {
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 4px;
}

.timer-circular .timer-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-top: 2px;
}

/* Button Styles */
.scarcityjet-button {
    display: inline-block;
    padding: 12px 24px;
    margin-top: 15px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.scarcityjet-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Expired Timer */
.timer-expired {
    font-size: 1.125rem;
    font-weight: 500;
    color: #dc3545;
}

/* Lock Overlay */
.scarcityjet-lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scarcityjet-lock-message {
    background: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Final Message */
.scarcityjet-final-message {
    background: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: 500;
    border: 1px solid #ffeaa7;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
    40%, 43% { transform: translate3d(0, -30px, 0); }
    70% { transform: translate3d(0, -15px, 0); }
    90% { transform: translate3d(0, -4px, 0); }
}

.wp-scarcityjet-timer.animate-pulse {
    animation: pulse 2s infinite;
}

.wp-scarcityjet-timer.animate-slide {
    animation: slideIn 0.5s ease-out;
}

.wp-scarcityjet-timer.animate-bounce {
    animation: bounce 1s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-scarcityjet-timer {
        padding: 15px;
        margin: 15px 0;
    }
    
    .timer-flip {
        gap: 10px;
    }
    
    .timer-unit {
        min-width: 50px;
    }
    
    .timer-number {
        font-size: 2rem;
    }
    
    .timer-label {
        font-size: 0.75rem;
    }
    
    .timer-digital {
        gap: 8px;
    }
    
    .timer-segment {
        min-width: 40px;
    }
    
    .timer-separator {
        font-size: 1.5rem;
    }
    
    .timer-minimal .timer-text {
        font-size: 1rem;
    }
    
    .timer-circular {
        transform: scale(0.8);
    }
    
    .scarcityjet-button {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .wp-scarcityjet-timer {
        padding: 10px;
        margin: 10px 0;
    }
    
    .timer-flip {
        gap: 8px;
    }
    
    .timer-unit {
        min-width: 40px;
    }
    
    .timer-number {
        font-size: 1.5rem;
    }
    
    .timer-label {
        font-size: 0.625rem;
    }
    
    .timer-digital {
        gap: 5px;
    }
    
    .timer-segment {
        min-width: 35px;
    }
    
    .timer-separator {
        font-size: 1.25rem;
    }
    
    .timer-minimal .timer-text {
        font-size: 0.875rem;
    }
    
    .timer-circular {
        transform: scale(0.7);
    }
    
    .scarcityjet-button {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
}

/* Hide on mobile/desktop */
@media (max-width: 768px) {
    .wp-scarcityjet-timer.hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .wp-scarcityjet-timer.hide-desktop {
        display: none !important;
    }
}

/* Sticky timer responsive adjustments */
@media (max-width: 768px) {
    .wp-scarcityjet-timer.sticky-top,
    .wp-scarcityjet-timer.sticky-bottom {
        padding: 10px;
    }
    
    .timer-flip {
        gap: 5px;
    }
    
    .timer-unit {
        min-width: 35px;
    }
    
    .timer-number {
        font-size: 1.25rem;
    }
    
    .timer-label {
        font-size: 0.5rem;
    }
}

/* Print styles */
@media print {
    .wp-scarcityjet-timer {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wp-scarcityjet-timer {
        border: 2px solid currentColor;
    }
    
    .timer-number {
        font-weight: 900;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wp-scarcityjet-timer {
        animation: none !important;
        transition: none !important;
    }
    
    .timer-number {
        transition: none !important;
    }
    
    .scarcityjet-button:hover {
        transform: none !important;
    }
} 