/**
 * IH Newsletter Public Styles
 */

/* Container */
.ih-newsletter-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Form */
.ih-newsletter-form {
    width: 100%;
}

.ih-newsletter-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ih-newsletter-name-fields {
    display: flex;
    gap: 12px;
}

.ih-newsletter-name-fields .ih-newsletter-input {
    flex: 1;
}

.ih-newsletter-email-row {
    display: flex;
    gap: 0;
}

.ih-newsletter-input {
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 300;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    font-family: inherit;
}

.ih-newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.ih-newsletter-input:focus {
    border-color: #009EDB;
    background: rgba(255, 255, 255, 0.15);
}

.ih-newsletter-email {
    flex: 1;
    border-radius: 4px 0 0 4px;
    border-right: none;
}

/* Button */
.ih-newsletter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, #009EDB, #0077B6);
    color: #FFFFFF;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    white-space: nowrap;
    font-family: inherit;
    min-width: 140px;
}

.ih-newsletter-btn:hover {
    background: linear-gradient(135deg, #0077B6, #005A8C);
    transform: translateY(-1px);
}

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

.ih-newsletter-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ih-newsletter-spinner svg {
    animation: ih-spin 1s linear infinite;
}

@keyframes ih-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success State */
.ih-newsletter-success {
    text-align: center;
    padding: 20px 0;
}

.ih-newsletter-checkmark {
    color: #4CAF50;
    margin-bottom: 12px;
}

.ih-newsletter-checkmark svg {
    animation: ih-check-pop 0.4s ease-out;
}

@keyframes ih-check-pop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.ih-newsletter-success-msg {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
}

/* Light background variant */
.has-base-background-color .ih-newsletter-input,
.ih-newsletter-light .ih-newsletter-input {
    border-color: #ddd;
    background: #fff;
    color: #333;
}

.has-base-background-color .ih-newsletter-input::placeholder,
.ih-newsletter-light .ih-newsletter-input::placeholder {
    color: #999;
}

.has-base-background-color .ih-newsletter-success-msg,
.ih-newsletter-light .ih-newsletter-success-msg {
    color: #333;
}

/* Toast */
.ih-newsletter-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 100000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    animation: ih-toast-in 0.3s ease-out;
}

@keyframes ih-toast-in {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ih-newsletter-toast.success {
    background: #1a7c3d;
    color: #fff;
}

.ih-newsletter-toast.error {
    background: #dc3545;
    color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
    .ih-newsletter-name-fields {
        flex-direction: column;
    }

    .ih-newsletter-email-row {
        flex-direction: column;
        gap: 12px;
    }

    .ih-newsletter-email {
        border-radius: 4px;
        border-right: 1px solid rgba(255, 255, 255, 0.25);
    }

    .ih-newsletter-btn {
        border-radius: 4px;
        width: 100%;
    }

    .ih-newsletter-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}
