/**
 * Hushly FAQs - Block Frontend Styles
 *
 * Additional styles specific to Gutenberg block rendering
 * 
 * @package Hushly_GEOSherpa
 */

/* Block Wrapper */
.wp-block-hushly-geosherpa-api-data {
    margin: 1.5em 0;
}

/* Alignments */
.wp-block-hushly-geosherpa-api-data.alignwide {
    max-width: var(--wp--style--global--wide-size, 1200px);
    margin-left: auto;
    margin-right: auto;
}

.wp-block-hushly-geosherpa-api-data.alignfull {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding-left: 20px;
    padding-right: 20px;
}

/* Block Title in Context */
.wp-block-hushly-geosherpa-api-data .hushly-geosherpa-block-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Animation for Auto-refresh */
.hushly-geosherpa-block[data-refresh] {
    transition: opacity 0.3s ease;
}

.hushly-geosherpa-block[data-refresh].refreshing {
    opacity: 0.6;
}

/* Stagger Animation for Items */
.hushly-geosherpa-list-item,
.hushly-geosherpa-card,
.hushly-geosherpa-grid-item {
    animation: ac-fadeInUp 0.4s ease-out both;
}

.hushly-geosherpa-list-item:nth-child(1) { animation-delay: 0s; }
.hushly-geosherpa-list-item:nth-child(2) { animation-delay: 0.05s; }
.hushly-geosherpa-list-item:nth-child(3) { animation-delay: 0.1s; }
.hushly-geosherpa-list-item:nth-child(4) { animation-delay: 0.15s; }
.hushly-geosherpa-list-item:nth-child(5) { animation-delay: 0.2s; }

.hushly-geosherpa-card:nth-child(1),
.hushly-geosherpa-grid-item:nth-child(1) { animation-delay: 0s; }
.hushly-geosherpa-card:nth-child(2),
.hushly-geosherpa-grid-item:nth-child(2) { animation-delay: 0.1s; }
.hushly-geosherpa-card:nth-child(3),
.hushly-geosherpa-grid-item:nth-child(3) { animation-delay: 0.2s; }
.hushly-geosherpa-card:nth-child(4),
.hushly-geosherpa-grid-item:nth-child(4) { animation-delay: 0.3s; }

@keyframes ac-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hushly-geosherpa-list-item,
    .hushly-geosherpa-card,
    .hushly-geosherpa-grid-item {
        animation: none;
    }
    
    .hushly-geosherpa-card:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .hushly-geosherpa-block {
        break-inside: avoid;
    }
    
    .hushly-geosherpa-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .hushly-geosherpa-card:hover {
        transform: none;
    }
}
