/**
 * Codocraft Smart Notify - Frontend Styles
 *
 * Frontend notification bar styles for the Codocraft Smart Notify WordPress plugin.
 * Provides responsive, animated notification bars with professional design.
 *
 * @package     CodocraftSmartNotify
 * @version     1.0.0
 * @author      Codocraft Solutions
 * @license     GPL-2.0+
 */

/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
    /* Color Variables */
    --csn-primary: #0022ba;
    --csn-white: #ffffff;
    --csn-highlight: #ffeb3b;
    --csn-countdown: #ff4444;
    --csn-success: #46b450;
    --csn-warning: #ffb900;
    --csn-error: #dc3232;

    /* Shadow Variables */
    --csn-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --csn-shadow-lg: 0 2px 8px rgba(0,0,0,0.1);
    --csn-shadow-xl: 0 4px 16px rgba(0,0,0,0.2);

    /* Animation Variables */
    --csn-transition: all 0.3s ease;
    --csn-transition-fast: all 0.2s ease;

    /* Custom Plugin Variables */
    --csn-gradient: linear-gradient(135deg, #151450 0%, #23228a 100%);
    --csn-gradient-hover: linear-gradient(135deg, #23228a 0%, #151450 100%);
    --csn-color-hover: #edbe00;
    --button-bg-color: var(--csn-white);
    --button-text-color: var(--csn-primary);
}
/* ========================================
   NOTIFICATION BAR BASE STYLES
   ======================================== */

#csn-notification-bar {
    position: fixed;
    width: 100%;
    background: var(--csn-primary);
    color: var(--csn-white);
    padding: 15px 0;
    box-shadow: var(--csn-shadow);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    overflow: hidden;
    z-index: 999999;
    top: 0;
    left: 0;
    right: 0;
}


/* ========================================
   POSITIONING STYLES
   ======================================== */
.csn-position-top {
    position: fixed !important;
    top: 0 !important;
    bottom: auto !important;
}

.csn-position-bottom {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.csn-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: relative;
    z-index: 2;
}

.csn-layout-left .csn-container {
    justify-content: flex-start !important;
}

.csn-layout-center .csn-container {
    justify-content: center !important;
}

.csn-layout-center .csn-content-wrapper {
    text-align: center;
    flex: none;
}

.csn-layout-right .csn-container {
    justify-content: flex-end !important;
}

.csn-layout-right .csn-content-wrapper {
    flex: none;
}

.csn-layout-text-center .csn-container {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    gap: 15px;
}

.csn-layout-text-center .csn-content-wrapper {
    text-align: center;
}

.csn-layout-text-center .csn-button {
    margin: 0;
}

.csn-layout-text-left-button-right .csn-container {
    justify-content: space-between !important;
}

.csn-layout-text-left-button-right .csn-content-wrapper {
    text-align: left;
}

/* ========================================
   CONTENT STYLES
   ======================================== */

.csn-content-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.csn-icon {
    font-size: 24px;
    color: var(--csn-white);
    opacity: 0.9;
    animation: bounceIn 0.6s ease-out 0.3s both;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.csn-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.csn-text {
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.csn-text-small { font-size: 0.9em; }
.csn-text-medium { font-size: 1.1em; }
.csn-text-large { font-size: 1.3em; }
.csn-text-xlarge { font-size: 1.5em; }

.csn-subheading {
    line-height: 1.3;
    opacity: 0.8;
    margin-top: 5px;
    animation: fadeInUp 0.6s ease-out 0.7s both;
}

.csn-subheading-small { font-size: 0.7em; }
.csn-subheading-medium { font-size: 0.9em; }
.csn-subheading-large { font-size: 1.1em; }

.csn-text strong {
    font-weight: 700;
    color: var(--csn-white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.csn-highlight {
    font-weight: 700 !important;
    color: var(--csn-highlight) !important;
    background: rgba(255, 235, 59, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    animation: pulse 2s infinite !important;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.csn-layout-countdown-special {
    justify-content: space-between;
}

.csn-countdown-wrapper {
    flex: 1;
    text-align: center;
}

.csn-countdown-center {
    text-align: center;
}

.csn-text-center {
    text-align: center;
}

.csn-countdown {
    font-weight: 700;
    color: var(--csn-countdown);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    animation: fadeInUp 0.6s ease-out 0.8s both;
    display: inline-block;
}

.csn-countdown-days,
.csn-countdown-hours,
.csn-countdown-minutes,
.csn-countdown-seconds {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 6px;
    border-radius: 6px;
    margin: 0 2px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.csn-countdown-label {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0 2px;
}

.csn-notification-image {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.csn-image-only {
    padding: 0;
}

.csn-image-only .csn-notification-image {
    max-height: none;
    object-fit: cover;
}

.csn-image-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.csn-image-link:hover {
    transform: scale(1.05);
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.csn-button {
    color: white;
    border: 2px solid var(--csn-primary);
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    margin-left: 20px;
    transition: var(--csn-transition);
    box-shadow: var(--csn-shadow-lg);
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    animation: fadeInUp 0.6s ease-out 0.7s both;
}

.csn-button-icon {
    font-size: 14px;
    transition: transform 0.2s ease;
}




.csn-button:hover .csn-button-icon {
    transform: translateX(2px);
}

.csn-button-outline:hover {
    background-color: var(--button-bg-color) !important;
    color: var(--button-text-color) !important;
}

.csn-button-gradient:hover {
    filter: brightness(1.1);
}

/* ========================================
   DISMISS BUTTON STYLES
   ======================================== */

.csn-dismiss {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.4);
    color: var(--csn-white);
    cursor: pointer;
    margin-left: 20px;
    opacity: 0.9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    animation: fadeInPremium 0.8s ease-out 0.9s both;
    backdrop-filter: blur(10px);
    box-shadow: var(--csn-shadow-lg);
}

.csn-dismiss .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.csn-dismiss:hover {
    opacity: 1;
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.7);
    transform: scale(1.05);
    box-shadow: var(--csn-shadow-xl);
    color: var(--csn-white);
}

@keyframes fadeInPremium {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    /* ========================================
       LAYOUT STYLES
       ======================================== */
    
    .csn-container {
        padding: 0 20px;
    }

    .csn-text {
        font-size: 1em;
    }

    .csn-button {
        padding: 10px 20px;
        font-size: 0.9em;
        margin-left: 20px;
    }
}

@media (max-width: 768px) {
    #csn-notification-bar {
        padding: 15px 0;
        font-size: 14px;
    }

    .csn-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 15px;
        gap: 15px;
    }

    .csn-content-wrapper {
        justify-content: center;
        gap: 10px;
        flex-direction: column;
    }

    .csn-icon {
        font-size: 20px;
    }

    .csn-text {
        font-size: 0.95em;
        line-height: 1.3;
    }

    .csn-button {
        margin: 0;
        padding: 12px 20px;
        font-size: 0.85em;
        gap: 6px;
    }

    .csn-button-icon {
        font-size: 14px;
    }

    .csn-dismiss {
        position: absolute;
        top: 10px;
        right: 10px;
        margin: 0;
        width: 36px;
        height: 36px;
    }

    .csn-dismiss .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    #csn-notification-bar {
        padding: 12px 0;
        font-size: 13px;
    }

    .csn-container {
        padding: 0 10px;
        gap: 12px;
    }

    .csn-content-wrapper {
        gap: 8px;
    }

    .csn-icon {
        font-size: 18px;
    }

    .csn-text {
        font-size: 0.9em;
    }

    .csn-button {
        padding: 10px 16px;
        font-size: 0.8em;
        gap: 4px;
    }

    .csn-button-icon {
        font-size: 12px;
    }

    .csn-dismiss {
        width: 32px;
        height: 32px;
    }

    .csn-dismiss .dashicons {
        font-size: 12px;
        width: 12px;
        height: 12px;
    }
}

/* Animation for dismiss */
#csn-notification-bar.csn-dismissing {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* ========================================
   STATE STYLES
   ======================================== */

/* Success state styling */
#csn-notification-bar.csn-success {
    background: var(--csn-success);
    box-shadow: 0 2px 4px rgba(70, 180, 80, 0.2);
}

#csn-notification-bar.csn-warning {
    background: var(--csn-warning);
    box-shadow: 0 2px 4px rgba(255, 185, 0, 0.2);
}

#csn-notification-bar.csn-error {
    background: var(--csn-error);
    box-shadow: 0 2px 4px rgba(220, 50, 50, 0.2);
}



/* ========================================
   END OF STYLES
   ======================================== */

/* Removed complex pattern animation for cleaner look */
