/**
 * Forever BE Premium - Component Styles
 * Centralized styles for inline-heavy components
 *
 * @package Forever_BE_Premium
 * @since 1.0.1
 */

/* ==========================================================================
   TOP BAR COMPONENT
   ========================================================================== */

.top-bar {
    background: linear-gradient(to right, var(--brand-green), #15803d);
    color: white;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 51;
}

.top-bar__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar__left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.top-bar__right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar__item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.top-bar__link {
    color: white;
    font-weight: 600;
    transition: color 0.3s ease;
}

.top-bar__link:hover {
    color: var(--brand-gold);
}

/* ==========================================================================
   FOOTER COMPONENTS
   ========================================================================== */

/* Trust Badges Box */
.footer-trust-box {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

/* Stats Section */
.footer-stats {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #86efac;
}

.footer-stats__grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.footer-stats__item-value {
    color: var(--brand-green);
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
}

.footer-stats__item-label {
    color: #6b7280;
}

/* Newsletter Section */
.newsletter-section {
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    padding: 1.5rem 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.newsletter-section__decoration {
    position: absolute;
    width: 40%;
    height: 200%;
    background: radial-gradient(circle, rgba(30, 90, 62, 0.02) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.newsletter-section__decoration--left {
    top: -50%;
    left: -10%;
}

.newsletter-section__decoration--right {
    bottom: -50%;
    right: -10%;
}

.newsletter-section__content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

.newsletter-section__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.newsletter-section__subtitle {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.newsletter-section__form-wrapper {
    margin-bottom: 1rem;
}

.newsletter-form__container {
    display: flex;
    gap: 0.5rem;
    max-width: 460px;
    margin: 0 auto;
    padding: 0.25rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.newsletter-form__container:focus-within {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(30, 90, 62, 0.1);
}

.newsletter-form__input-wrapper {
    position: relative;
    flex: 1;
}

.newsletter-form__input {
    width: 100%;
    height: 40px;
    padding: 0 1rem;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: #1f2937;
    outline: none;
}

.newsletter-form__input::placeholder {
    color: #9ca3af;
}

.newsletter-form__button {
    height: 40px;
    padding: 0 1.25rem;
    background: var(--brand-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.newsletter-form__button:hover {
    background: #166534;
    transform: translateY(-1px);
}

.newsletter-form__button:active {
    transform: translateY(0);
}

/* Copyright */
.footer-copyright {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    width: 100%;
}

.footer-copyright__text {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin: 0;
}

.footer-copyright__brand {
    color: var(--brand-green);
    font-weight: 600;
}

/* ==========================================================================
   PRODUCT PAGE COMPONENTS
   ========================================================================== */

/* Trust Badges Container */
.product-trust-badges {
    padding: 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.product-trust-badges__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* ==========================================================================
   HEADER ADJUSTMENTS
   ========================================================================== */

.site-header--with-topbar {
    top: 40px;
}

@media (max-width: 1023px) {
    .top-bar {
        display: none;
    }

    .site-header--with-topbar {
        top: 0;
    }
}

/* ==========================================================================
   BODY PADDING ADJUSTMENT FOR FIXED HEADERS
   ========================================================================== */

body.has-topbar {
    padding-top: calc(var(--header-height-desktop) + 40px);
}

@media (max-width: 1023px) {
    body.has-topbar {
        padding-top: var(--header-height-mobile);
    }
}

/* ==========================================================================
   ACCESSIBILITY - REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
