/* Custom styles for Weekly Pulse */

:root {
    --wp-yellow: #FFD700; /* Updated to match logo documentation */
    --wp-dark: #333333;   /* Updated to match logo documentation */
    --wp-light: #FFFFFF;
    --wp-gray: #666666;
    --wp-light-gray: #F8F8F8;
    --primary-color: #FFD700; /* For logo animations */
    --primary-dark: #E6C200;  /* For logo animations */
    --secondary-color: #333333; /* For logo animations */
    --transition: all 0.3s ease;
}

body {
    background-color: var(--wp-light);
    color: var(--wp-dark);
    padding-bottom: 40px;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.navbar-brand img {
    height: 35px;
}

/* Logo styles - Animated version */
.logo {
    display: flex;
    align-items: center;
    position: relative;
    color: var(--wp-dark);
    text-decoration: none;
}

/* Icon Component */
.logo-icon {
    background-color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    position: relative;
    overflow: hidden;
}

.pulse-icon {
    width: 36px;
    height: 36px;
    position: relative;
    transform: translateZ(0);
}

.heartbeat-line {
    stroke: var(--wp-dark);
    stroke-width: 4;
}

@media (min-width: 768px) {
    .heartbeat-line {
        stroke-dasharray: 200;
        stroke-dashoffset: 200;
        animation: drawLine 2s ease-in-out forwards infinite;
    }
    
    .logo-text span::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: var(--primary-color);
        transform: translateX(-100%);
        opacity: 0;
        animation: ripple 3.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
        animation-delay: calc(1.65s + (0.2s * var(--index)));
    }
}

@keyframes drawLine {
    0% {
        stroke-dashoffset: 200;
    }
    50% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -200;
    }
}

/* Text Component */
.logo-text {
    display: flex;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--secondary-color);
}

/* Card & Content */
.card {
    background-color: white;
    border-radius: 12px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.card-header {
    background-color: var(--wp-yellow);
    border-radius: 12px 12px 0 0 !important;
    color: var(--wp-dark);
    font-weight: 600;
    padding: 15px 20px;
    border: none;
}

.list-group-item {
    background-color: white;
    color: var(--wp-dark);
    border-color: #eee;
    padding: 15px 20px;
}

/* Buttons */
.btn-primary {
    background-color: var(--wp-yellow);
    color: var(--wp-dark);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(255, 218, 85, 0.3);
}

.btn-primary:hover {
    background-color: #FFE578;
    color: var(--wp-dark);
    box-shadow: 0 6px 15px rgba(255, 218, 85, 0.4);
}

.btn-outline-primary {
    color: var(--wp-dark);
    border-color: var(--wp-yellow);
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--wp-yellow);
    color: var(--wp-dark);
    border-color: var(--wp-yellow);
}

/* Highlights and accents */
.highlight {
    color: var(--wp-yellow);
    font-weight: 600;
}

.badge-yellow {
    background-color: var(--wp-yellow);
    color: var(--wp-dark);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 15px;
}

.section-title {
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 60%;
    height: 4px;
    background-color: var(--wp-yellow);
    border-radius: 2px;
}

/* Steps and process */
.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--wp-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
    margin-right: 20px;
    color: var(--wp-dark);
    margin-bottom: 15px;
}

.step-circle.active {
    background-color: var(--wp-yellow);
}

.step-wrapper {
    margin-bottom: 30px;
}

.step-title {
    font-weight: 600;
    margin-bottom: 5px;
}

/* Mobile optimization */
@media (max-width: 576px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    .step-circle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Logo animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(0);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.8);
        opacity: 0;
    }
}

@keyframes dash {
    0%, 100% {
        stroke-dashoffset: 400;
    }
    30%, 70% {
        stroke-dashoffset: 0;
    }
}

@keyframes ripple {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    40%, 60% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Logo text ripple animation */
.logo-text span {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.logo-text span:nth-child(1) { --index: 1; }
.logo-text span:nth-child(2) { --index: 2; }
.logo-text span:nth-child(3) { --index: 3; }
.logo-text span:nth-child(4) { --index: 4; }
.logo-text span:nth-child(5) { --index: 5; }
.logo-text span:nth-child(6) { --index: 6; }
.logo-text span:nth-child(7) { --index: 7; }
.logo-text span:nth-child(8) { --index: 8; }
.logo-text span:nth-child(9) { --index: 9; }
.logo-text span:nth-child(10) { --index: 10; }
.logo-text span:nth-child(11) { --index: 11; }

.logo-text span::before {
    display: none; /* IMPORTANT NOTE: This disables the ripple animation globally. 
                     * For pages that need the logo animation (like signup_success and payment_success), 
                     * we use inline CSS to override this. See docs/logo_animation_fix.md for details. */
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .logo-text {
        font-size: 1.2rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .heartbeat-line, .pulse-icon::before, .logo-text span::before {
        animation: none !important;
    }
}

/* Success check animation */
@keyframes checkmark {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.bi-check-circle-fill {
    animation: checkmark 0.5s ease-in-out forwards;
    color: var(--wp-yellow);
}