/**
 * Frontend Styles for Advance Custom Messages Woo
 * Modern, responsive, and animated designs
 */

/* ===========================
   BASE MESSAGE CONTAINER
=========================== */
.scmw-message-container {
    margin: 20px 0;
    padding: 10px 0px;
    opacity: 0;
    transform: translateY(20px);
}

.scmw-message-container.scmw-visible {
    opacity: 1;
    transform: translateY(0);
    clear: both;
}

.scmw-message-container:hover {
}

.scmw-message-container:focus-visible {
    outline: none !important;
}
/**
 * Breaking News Ticker Style
 * Modern animated ticker with customizable label
 */

/* ===========================
   BREAKING NEWS TICKER
=========================== */
.scmw-ticker-container {
    overflow: hidden;
    position: relative;
    background: #fff;
    border: 2px solid #0d6efd;
    border-radius: 8px;
    display: flex;
    align-items: stretch;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Ticker Label */
.scmw-ticker-label {
    position: relative;
    z-index: 3;
    background: #0d6efd;
    color: #fff;
    padding: 12px 25px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    border-right: 2px solid #0d6efd;
}

/* Pulsing Dot Animation */
.scmw-ticker-label::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

/* Remove old gradient overlays */
.scmw-ticker-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 2;
    pointer-events: none;
}

.scmw-ticker-wrapper {
    display: flex;
    white-space: nowrap;
    flex: 1;
    align-items: center;
    overflow: hidden;
}

.scmw-ticker-text {
    display: inline-block;
    padding: 12px 25px;
    padding-right: 100px;
    animation: ticker-scroll 30s linear infinite;
    font-weight: 500;
    font-size: 15px;
    color: #333;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.scmw-type-text_ticker {
    padding: 0;
    background-color: inherit;
}

/* Pause animation on hover */
.scmw-ticker-container:hover .scmw-ticker-text {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */
@media (max-width: 768px) {
    .scmw-ticker-container::before {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .scmw-ticker-text {
        font-size: 14px;
        padding: 10px 20px;
        padding-right: 80px;
    }
}

@media (max-width: 480px) {
    .scmw-ticker-container::before {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .scmw-ticker-text {
        font-size: 13px;
        padding: 8px 15px;
        padding-right: 60px;
    }
}

/* ===========================
   ALTERNATIVE COLOR SCHEMES
=========================== */

/* Red Theme */
.scmw-message-container.scmw-ticker-red .scmw-ticker-container::before {
    background: #dc3545;
}

.scmw-message-container.scmw-ticker-red .scmw-ticker-container {
    border-color: #dc3545;
}

/* Green Theme */
.scmw-message-container.scmw-ticker-green .scmw-ticker-container::before {
    background: #28a745;
}

.scmw-message-container.scmw-ticker-green .scmw-ticker-container {
    border-color: #28a745;
}

/* Dark Theme */
.scmw-message-container.scmw-ticker-dark .scmw-ticker-container {
    background: #2d3748;
    border-color: #2d3748;
}

.scmw-message-container.scmw-ticker-dark .scmw-ticker-container::before {
    background: #1a202c;
}

.scmw-message-container.scmw-ticker-dark .scmw-ticker-text {
    color: #fff;
}

.scmw-message-container.scmw-ticker-dark .scmw-ticker-container::after {
    background: linear-gradient(to left, rgba(45,55,72,1) 0%, rgba(45,55,72,0) 100%);
}

/* ===========================
   COUNTDOWN TIMER
=========================== */
.scmw-countdown-container {
    text-align: center;
    padding: 25px;
}

.scmw-countdown-label-before,
.scmw-countdown-label-after {
    font-size: 18px;
    margin-bottom: 15px;
}

.scmw-countdown-timer {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.scmw-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.scmw-countdown-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.scmw-countdown-value {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.scmw-countdown-label {
    font-size: 12px;
    text-transform: uppercase;
    margin-top: 8px;
    opacity: 0.95;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ===========================
   CUSTOM IMAGE
=========================== */
.scmw-custom-image-container {
    text-align: center;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.scmw-custom-image-container img {
    max-width: 100%;
    height: auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.scmw-custom-image-container a {
    display: inline-block;
}

.scmw-custom-image-container a:hover img {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ===========================
   CUSTOM MESSAGE
=========================== */
.scmw-custom-message {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-left: 5px solid #2271b1;
    padding: 20px 25px;
    line-height: 1.6;
}

.scmw-custom-message h1,
.scmw-custom-message h2,
.scmw-custom-message h3,
.scmw-custom-message h4,
.scmw-custom-message h5,
.scmw-custom-message h6 {
    margin-top: 0;
    color: #2271b1;
}

.scmw-custom-message p:last-child {
    margin-bottom: 0;
}

.scmw-custom-message a {
    color: #2271b1;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.scmw-custom-message a:hover {
    border-bottom-color: #2271b1;
}

/* ===========================
   DISCOUNT CODE
=========================== */
.scmw-discount-container {
    padding: 15px;
}

.scmw-discount-description {
    font-size: 16px;
}

.scmw-discount-code {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 12px 25px;
    border-radius: 50px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.scmw-discount-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.scmw-code-text {
    letter-spacing: 2px;
    user-select: all;
}

.scmw-copy-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(34,113,177,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scmw-copy-btn:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34,113,177,0.4);
}

.scmw-copy-btn:active {
    transform: translateY(0);
}

.scmw-copy-btn.copied {
    background: #28a745;
    box-shadow: 0 2px 8px rgba(40,167,69,0.3);
}

.scmw-copy-btn.copied::before {
    content: '✓ ';
}

/* ===========================
   SOCIAL SHARE
=========================== */
.scmw-social-share-container {
    padding: 25px;
    padding-left: 0;
}

.scmw-social-share-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.scmw-social-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.scmw-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 22px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.scmw-social-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.scmw-social-btn:hover::before {
    width: 100px;
    height: 100px;
}

.scmw-social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.scmw-social-btn:active {
    transform: translateY(-3px) scale(1.05);
}

/* Platform specific colors */
.scmw-social-btn.facebook {
    background: linear-gradient(135deg, #3b5998 0%, #2d4373 100%);
}

.scmw-social-btn.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
}

.scmw-social-btn.pinterest {
    background: linear-gradient(135deg, #bd081c 0%, #8e0615 100%);
}

.scmw-social-btn.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005a8b 100%);
}

.scmw-social-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #1da851 100%);
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */
@media (max-width: 768px) {
    .scmw-message-container {
        margin: 15px 0;
        padding: 15px 20px;
        border-radius: 8px;
    }
    
    .scmw-ticker-text {
        font-size: 14px;
    }
    
    .scmw-stock-count {
        font-size: 28px;
    }
    
    .scmw-countdown-timer {
        gap: 15px;
    }
    
    .scmw-countdown-item {
        min-width: 60px;
        padding: 8px;
    }
    
    .scmw-countdown-value {
        font-size: 28px;
    }
    
    .scmw-countdown-label {
        font-size: 10px;
    }
    
    .scmw-discount-code {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
        font-size: 18px;
    }
    
    .scmw-social-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .scmw-message-container {
        margin: 10px 0;
        padding: 12px 15px;
    }
    
    .scmw-ticker-text {
        font-size: 13px;
        padding-right: 50px;
    }
    
    .scmw-stock-counter {
        font-size: 16px;
        padding: 15px;
    }
    
    .scmw-stock-count {
        font-size: 24px;
    }
    
    .scmw-countdown-timer {
        gap: 10px;
    }
    
    .scmw-countdown-item {
        min-width: 50px;
        padding: 6px;
    }
    
    .scmw-countdown-value {
        font-size: 24px;
    }
    
    .scmw-countdown-label {
        font-size: 9px;
        margin-top: 5px;
    }
    
    .scmw-discount-code {
        font-size: 16px;
        padding: 12px 18px;
    }
    
    .scmw-copy-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .scmw-social-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .scmw-social-buttons {
        gap: 10px;
    }
}

/* ===========================
   ACCESSIBILITY
=========================== */
.scmw-message-container:focus-within {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.scmw-copy-btn:focus,
.scmw-social-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===========================
   PRINT STYLES
=========================== */
@media print {
    .scmw-social-share-container,
    .scmw-copy-btn {
        display: none;
    }
    
    .scmw-message-container {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .scmw-ticker-text {
        animation: none;
    }
}

/* ===========================
   DARK MODE SUPPORT
=========================== */
@media (prefers-color-scheme: dark) {
    .scmw-custom-message {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: #e0e0e0;
    }
    
    .scmw-custom-message h1,
    .scmw-custom-message h2,
    .scmw-custom-message h3,
    .scmw-custom-message h4,
    .scmw-custom-message h5,
    .scmw-custom-message h6 {
        color: #6ea8fe;
    }
    
    .scmw-custom-message a {
        color: #6ea8fe;
    }
}

/* ===========================
   ANIMATION CLASSES
=========================== */
.scmw-fade-in {
    animation: fadeIn 0.6s ease;
}

.scmw-slide-up {
    animation: slideUp 0.6s ease;
}

.scmw-bounce-in {
    animation: bounceIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}