/* 
 * First Aid Pro Sticky Note CSS
 * Using brand colors: Pale Honeydew #F3F8F7 with shadow
 * Positioned below header, responsive to header height
 */

.fap-sticky-note-container {
    position: fixed;
    z-index: 999;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* Top position will be set by JavaScript based on header height */
}

/* Position variants - controlled by JavaScript */
.fap-sticky-note-container.fap-position-top-right {
    /* Right position set by JavaScript */
}

.fap-sticky-note-container.fap-position-top-left {
    /* Left position set by JavaScript */
}

.fap-sticky-note-container.fap-position-top-left .fap-sticky-note {
    transform: rotate(-10deg);
}

.fap-sticky-note-container.fap-position-top-center {
    left: 50%;
    transform: translateX(-50%);
}

/* When centered and hidden */
.fap-sticky-note-container.fap-position-top-center.fap-hidden {
    transform: translateX(-50%) translateY(-30px);
}

/* Hidden state */
.fap-sticky-note-container.fap-hidden {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
}

.fap-sticky-note-container.fap-position-top-center.fap-hidden {
    transform: translateX(-50%) translateY(-30px);
}

/* The sticky note card */
.fap-sticky-note {
    width: 200px;
    min-height: 130px;
    background: #F3F8F7; /* Pale Honeydew */
    padding: 25px 18px;
    box-shadow: 
        0 4px 6px rgba(22, 35, 31, 0.1),
        0 10px 20px rgba(22, 35, 31, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    transform: rotate(-2deg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    display: block;
    border-radius: 25px;
    border: 1px solid rgba(17, 105, 20, 0.08);
    /* animation removed - controlled by animation setting */
}

.fap-sticky-note:hover {
    transform: rotate(0deg) scale(1.05) translateY(-4px);
    box-shadow: 
        0 8px 12px rgba(22, 35, 31, 0.15),
        0 16px 30px rgba(22, 35, 31, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fap-sticky-note-container.fap-position-top-left .fap-sticky-note:hover {
    transform: rotate(0deg) scale(1.05) translateY(-4px);
}

/* Tape effect at top */
.fap-sticky-note::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(22, 35, 31, 0.1);
    box-shadow: 
        0 2px 4px rgba(22, 35, 31, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}

/* Subtle paper texture */
.fap-sticky-note::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(22, 35, 31, 0.01) 2px,
            rgba(22, 35, 31, 0.01) 4px
        );
    pointer-events: none;
    border-radius: 25px;
}

/* Content wrapper */
.fap-sticky-note-content {
    position: relative;
    z-index: 2;
}

/* Title */
.fap-sticky-note-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #16231F; /* Dark Green */
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* Message text */
.fap-sticky-note-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: #20342E; /* Mid Green */
    text-align: center;
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 12px;
}

/* View More Button */
.fap-view-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #116914;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(17, 105, 20, 0.15);
}

.fap-view-more-arrow {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.fap-sticky-note:hover .fap-view-more-arrow {
    transform: translateX(4px);
}

/* Remove link underlines */
.fap-sticky-note-container {
    text-decoration: none !important;
}

.fap-sticky-note-container:hover,
.fap-sticky-note-container:focus,
.fap-sticky-note-container:active {
    text-decoration: none !important;
}

/* Badge */
.fap-sticky-note-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #BC0000; /* Red */
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 3px 8px rgba(188, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 3;
    animation: badgePulse 2.5s ease-in-out infinite;
}

/* Animations */
@keyframes gentleFloat {
    0%, 100% { 
        transform: rotate(-2deg) translateY(0); 
    }
    50% { 
        transform: rotate(-3deg) translateY(-5px); 
    }
}

@keyframes gentleFloatTopLeft {
    0%, 100% { 
        transform: rotate(-10deg) translateY(0); 
    }
    50% { 
        transform: rotate(-11deg) translateY(-5px); 
    }
}

@keyframes badgePulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 
            0 3px 8px rgba(188, 0, 0, 0.4),
            0 1px 2px rgba(0, 0, 0, 0.2);
    }
    50% { 
        transform: scale(1.12);
        box-shadow: 
            0 5px 12px rgba(188, 0, 0, 0.5),
            0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Animation Classes */
.fap-animation-float .fap-sticky-note {
    animation: floatAnimation 2s ease-in-out;
}

.fap-position-top-left.fap-animation-float .fap-sticky-note {
    animation: floatAnimationTopLeft 2s ease-in-out;
}

.fap-animation-bounce .fap-sticky-note {
    animation: bounceAnimation 1s ease;
}

.fap-position-top-left.fap-animation-bounce .fap-sticky-note {
    animation: bounceAnimationTopLeft 1s ease;
}

.fap-animation-shake .fap-sticky-note {
    animation: shakeAnimation 0.8s ease;
}

.fap-position-top-left.fap-animation-shake .fap-sticky-note {
    animation: shakeAnimationTopLeft 0.8s ease;
}

.fap-animation-pulse .fap-sticky-note {
    animation: pulseAnimation 1s ease;
}

.fap-position-top-left.fap-animation-pulse .fap-sticky-note {
    animation: pulseAnimationTopLeft 1s ease;
}

.fap-animation-swing .fap-sticky-note {
    animation: swingAnimation 1s ease;
}

.fap-position-top-left.fap-animation-swing .fap-sticky-note {
    animation: swingAnimationTopLeft 1s ease;
}

.fap-animation-wobble .fap-sticky-note {
    animation: wobbleAnimation 1s ease;
}

.fap-position-top-left.fap-animation-wobble .fap-sticky-note {
    animation: wobbleAnimationTopLeft 1s ease;
}

.fap-animation-tada .fap-sticky-note {
    animation: tadaAnimation 1s ease;
}

.fap-position-top-left.fap-animation-tada .fap-sticky-note {
    animation: tadaAnimationTopLeft 1s ease;
}

.fap-animation-heartbeat .fap-sticky-note {
    animation: heartbeatAnimation 1.5s ease;
}

.fap-position-top-left.fap-animation-heartbeat .fap-sticky-note {
    animation: heartbeatAnimationTopLeft 1.5s ease;
}

.fap-animation-flash .fap-sticky-note {
    animation: flashAnimation 1s ease;
}

.fap-position-top-left.fap-animation-flash .fap-sticky-note {
    animation: flashAnimationTopLeft 1s ease;
}

@keyframes floatAnimation {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(-3deg) translateY(-10px); }
}

@keyframes floatAnimationTopLeft {
    0%, 100% { transform: rotate(-10deg) translateY(0); }
    50% { transform: rotate(-11deg) translateY(-10px); }
}

@keyframes bounceAnimation {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(-2deg) translateY(-15px); }
}

@keyframes bounceAnimationTopLeft {
    0%, 100% { transform: rotate(-10deg) translateY(0); }
    50% { transform: rotate(-10deg) translateY(-15px); }
}

@keyframes shakeAnimation {
    0%, 100% { transform: rotate(-2deg) translateX(0); }
    25% { transform: rotate(-2deg) translateX(-10px); }
    75% { transform: rotate(-2deg) translateX(10px); }
}

@keyframes shakeAnimationTopLeft {
    0%, 100% { transform: rotate(-10deg) translateX(0); }
    25% { transform: rotate(-10deg) translateX(-10px); }
    75% { transform: rotate(-10deg) translateX(10px); }
}

@keyframes pulseAnimation {
    0%, 100% { transform: rotate(-2deg) scale(1); }
    50% { transform: rotate(-2deg) scale(1.1); }
}

@keyframes pulseAnimationTopLeft {
    0%, 100% { transform: rotate(-10deg) scale(1); }
    50% { transform: rotate(-10deg) scale(1.1); }
}

@keyframes swingAnimation {
    20% { transform: rotate(5deg); }
    40% { transform: rotate(-5deg); }
    60% { transform: rotate(3deg); }
    80% { transform: rotate(-3deg); }
    100% { transform: rotate(-2deg); }
}

@keyframes swingAnimationTopLeft {
    20% { transform: rotate(-3deg); }
    40% { transform: rotate(-13deg); }
    60% { transform: rotate(-7deg); }
    80% { transform: rotate(-11deg); }
    100% { transform: rotate(-10deg); }
}

@keyframes wobbleAnimation {
    0%, 100% { transform: rotate(-2deg) translateX(0); }
    15% { transform: rotate(-8deg) translateX(-20px); }
    30% { transform: rotate(6deg) translateX(15px); }
    45% { transform: rotate(-4deg) translateX(-10px); }
    60% { transform: rotate(3deg) translateX(8px); }
    75% { transform: rotate(-2deg) translateX(-5px); }
}

@keyframes wobbleAnimationTopLeft {
    0%, 100% { transform: rotate(-10deg) translateX(0); }
    15% { transform: rotate(-16deg) translateX(-20px); }
    30% { transform: rotate(-2deg) translateX(15px); }
    45% { transform: rotate(-12deg) translateX(-10px); }
    60% { transform: rotate(-5deg) translateX(8px); }
    75% { transform: rotate(-10deg) translateX(-5px); }
}

@keyframes tadaAnimation {
    0%, 100% { transform: rotate(-2deg) scale(1); }
    10%, 20% { transform: rotate(-5deg) scale(0.95); }
    30%, 50%, 70%, 90% { transform: rotate(5deg) scale(1.1); }
    40%, 60%, 80% { transform: rotate(-5deg) scale(1.1); }
}

@keyframes tadaAnimationTopLeft {
    0%, 100% { transform: rotate(-10deg) scale(1); }
    10%, 20% { transform: rotate(-13deg) scale(0.95); }
    30%, 50%, 70%, 90% { transform: rotate(-3deg) scale(1.1); }
    40%, 60%, 80% { transform: rotate(-13deg) scale(1.1); }
}

@keyframes heartbeatAnimation {
    0%, 100% { transform: rotate(-2deg) scale(1); }
    14% { transform: rotate(-2deg) scale(1.15); }
    28% { transform: rotate(-2deg) scale(1); }
    42% { transform: rotate(-2deg) scale(1.15); }
    56% { transform: rotate(-2deg) scale(1); }
}

@keyframes heartbeatAnimationTopLeft {
    0%, 100% { transform: rotate(-10deg) scale(1); }
    14% { transform: rotate(-10deg) scale(1.15); }
    28% { transform: rotate(-10deg) scale(1); }
    42% { transform: rotate(-10deg) scale(1.15); }
    56% { transform: rotate(-10deg) scale(1); }
}

@keyframes flashAnimation {
    0%, 50%, 100% { opacity: 1; transform: rotate(-2deg) scale(1); }
    25%, 75% { opacity: 0.3; transform: rotate(-2deg) scale(1.05); }
}

@keyframes flashAnimationTopLeft {
    0%, 50%, 100% { opacity: 1; transform: rotate(-10deg) scale(1); }
    25%, 75% { opacity: 0.3; transform: rotate(-10deg) scale(1.05); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .fap-sticky-note-container.fap-position-top-right {
        /* Right position controlled by JavaScript */
    }
    
    .fap-sticky-note-container.fap-position-top-left {
        /* Left position controlled by JavaScript */
    }
    
    .fap-sticky-note-container.fap-position-top-center {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .fap-sticky-note {
        width: 140px;
        min-height: 90px;
        padding: 14px 12px;
    }
    
    .fap-sticky-note-title {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .fap-sticky-note-text {
        font-size: 0.75rem;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    .fap-view-more {
        font-size: 0.7rem;
        padding-top: 6px;
        gap: 4px;
    }
    
    .fap-view-more-arrow {
        font-size: 0.85rem;
    }
    
    .fap-sticky-note-badge {
        width: 28px;
        height: 28px;
        font-size: 0.6rem;
        top: -8px;
        right: -8px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .fap-sticky-note-container.fap-position-top-right {
        /* Right position controlled by JavaScript */
    }
    
    .fap-sticky-note-container.fap-position-top-left {
        /* Left position controlled by JavaScript */
    }
    
    .fap-sticky-note {
        width: 185px;
        min-height: 120px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .fap-sticky-note {
        box-shadow: 
            0 4px 6px rgba(22, 35, 31, 0.12),
            0 10px 20px rgba(22, 35, 31, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }
}

/* Print - hide sticky note */
@media print {
    .fap-sticky-note-container {
        display: none !important;
    }
}

/* Accessibility - reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fap-sticky-note,
    .fap-sticky-note-badge,
    .fap-sticky-note-container {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus state for accessibility */
.fap-sticky-note:focus {
    outline: 3px solid #116914;
    outline-offset: 3px;
}

/* Active state */
.fap-sticky-note:active {
    transform: rotate(0deg) scale(0.98);
}
