/* Newsletter Bar Styles */

:root {
    --acnp-bar-bg: #0c3547;
    --acnp-bar-text: #ffffff;
    --acnp-bar-text-muted: rgba(255, 255, 255, 0.85);
    --acnp-bar-input-bg: rgba(255, 255, 255, 0.95);
    --acnp-bar-input-text: #1a1a2e;
    --acnp-bar-input-border: rgba(255, 255, 255, 0.3);
    --acnp-bar-input-focus: #fff;
    --acnp-bar-btn-bg: #0891b2;
    --acnp-bar-btn-hover: #06b6d4;
    --acnp-bar-btn-text: #ffffff;
    --acnp-bar-close-hover: rgba(255, 255, 255, 0.2);
    --acnp-bar-success: #10b981;
    --acnp-bar-error: #ef4444;
    --acnp-bar-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Base Bar Styles */
.acnp-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999990;
    background: var(--acnp-bar-bg);
    box-shadow: var(--acnp-bar-shadow);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease,
                visibility 0.4s ease;
}

/* Position Variants */
.acnp-bar--bottom {
    bottom: 0;
    transform: translateY(100%);
}

.acnp-bar--top {
    top: 0;
    transform: translateY(-100%);
}

/* Visible State */
.acnp-bar.acnp-bar--visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Inner Container */
.acnp-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
}

/* Content Section */
.acnp-bar__content {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

/* Message Text */
.acnp-bar__message {
    color: var(--acnp-bar-text);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* Form Styles */
.acnp-bar__form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 480px;
}

/* Honeypot - hidden from view */
.acnp-bar__hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Input Group */
.acnp-bar__input-group {
    display: flex;
    align-items: stretch;
    flex: 1;
    border-radius: 6px;
    overflow: hidden;
}

/* Email Input */
.acnp-bar__input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 400;
    color: var(--acnp-bar-input-text);
    background: transparent;
    border: none;
    outline: none;
    transition: background 0.2s ease;
}

.acnp-bar__input::placeholder {
    color: #6b7280;
}

.acnp-bar__input:focus {
    background: #fff;
}

/* Submit Button */
.acnp-bar__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    margin-left: 5px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--acnp-bar-btn-text);
    background: var(--acnp-bar-btn-bg);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.acnp-bar__submit:hover {
    background: var(--acnp-bar-btn-hover);
}

.acnp-bar__submit:active {
    transform: scale(0.98);
}

.acnp-bar__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Submit Button States */
.acnp-bar__submit-text {
    display: inline;
}

.acnp-bar__submit-loading {
    display: none;
}

.acnp-bar__submit.acnp-bar__submit--loading .acnp-bar__submit-text {
    display: none;
}

.acnp-bar__submit.acnp-bar__submit--loading .acnp-bar__submit-loading {
    display: inline-flex;
}

/* Close Button */
.acnp-bar__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--acnp-bar-text);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.acnp-bar__close:hover {
    background: var(--acnp-bar-close-hover);
}

.acnp-bar__close svg {
    width: 16px;
    height: 16px;
}

/* Message Feedback */
.acnp-bar__message-feedback {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
    animation: acnp-fade-in 0.3s ease;
}

.acnp-bar--bottom .acnp-bar__message-feedback {
    top: -50px;
}

.acnp-bar--top .acnp-bar__message-feedback {
    bottom: -50px;
}

.acnp-bar__message-feedback.acnp-bar__message-feedback--success {
    background: var(--acnp-bar-success);
    color: #fff;
}

.acnp-bar__message-feedback.acnp-bar__message-feedback--error {
    background: var(--acnp-bar-error);
    color: #fff;
}

/* Success State - transform bar into success message */
.acnp-bar.acnp-bar--success .acnp-bar__form {
    display: none;
}

.acnp-bar.acnp-bar--success .acnp-bar__message {
    color: var(--acnp-bar-success);
}

.acnp-bar.acnp-bar--success .acnp-bar__message::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    background: var(--acnp-bar-success);
    border-radius: 50%;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Animations */
@keyframes acnp-fade-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 900px) {
    .acnp-bar__inner {
        padding: 14px 20px;
        gap: 16px;
    }
    
    .acnp-bar__content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .acnp-bar__message {
        white-space: normal;
        text-align: center;
        font-size: 14px;
    }
    
    .acnp-bar__form {
        max-width: none;
    }
    
    .acnp-bar__input-group {
        flex: 1;
    }
}

@media (max-width: 600px) {
    .acnp-bar__inner {
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
    }
    
    .acnp-bar__content {
        width: 100%;
    }
    
    .acnp-bar__message {
        font-size: 13px;
        padding-right: 30px;
    }
    
    .acnp-bar__close {
        position: absolute;
        top: 8px;
        right: 8px;
    }
    
    .acnp-bar__input-group {
        flex-direction: column;
        border-radius: 6px;
    }
    
    .acnp-bar__input {
        min-width: unset;
        padding: 14px 16px;
        border-radius: 6px 6px 0 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .acnp-bar__submit {
        padding: 14px 20px;
        border-radius: 0 0 6px 6px;
        justify-content: center;
    }
    
    .acnp-bar__message-feedback {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .acnp-bar--bottom .acnp-bar__message-feedback {
        top: -40px;
    }
    
    .acnp-bar--top .acnp-bar__message-feedback {
        bottom: -40px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .acnp-bar {
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }
    
    .acnp-bar--bottom,
    .acnp-bar--top {
        transform: translateY(0);
    }
    
    .acnp-bar:not(.acnp-bar--visible) {
        opacity: 0;
        visibility: hidden;
    }
}

