/**
 * ZooSpace Marketing Hub - Subscription Form Styles
 * Transparent wrapper, white input, orange button stacked below.
 */

:root {
    --zmh-primary: #F5A623;
    --zmh-primary-hover: #E09000;
    --zmh-input-bg: #FFFFFF;
    --zmh-input-border: rgba(255, 255, 255, 0.35);
    --zmh-input-text: #1F2937;
    --zmh-text-light: #FFFFFF;
    --zmh-text-muted: rgba(255, 255, 255, 0.65);
    --zmh-radius: 10px;
}

.zmh-subscribe-wrapper,
.zmh-subscribe-wrapper.zmh-theme-dark,
.zmh-subscribe-wrapper.zmh-theme-light {
    background: transparent !important;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.zmh-subscribe-wrapper *,
.zmh-subscribe-wrapper *::before,
.zmh-subscribe-wrapper *::after {
    box-sizing: border-box;
}

.zmh-subscribe-inner {
    padding: 0;
    background: transparent;
}

.zmh-subscribe-title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
    color: var(--zmh-text-light);
    line-height: 1.3;
}

.zmh-subscribe-description {
    margin: 0 0 18px;
    color: var(--zmh-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.zmh-subscribe-form {
    display: block;
}

.zmh-subscribe-form .zmh-field {
    margin: 0 0 12px;
    display: block;
}

.zmh-subscribe-form .zmh-field:last-of-type {
    margin-bottom: 0;
}

/* Input — white background, dark text, no dark box */
.zmh-subscribe-form .zmh-input {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: var(--zmh-input-bg);
    border: 1px solid var(--zmh-input-border);
    border-radius: var(--zmh-radius);
    font-size: 15px;
    font-family: inherit;
    color: var(--zmh-input-text);
    line-height: 1.4;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.zmh-subscribe-form .zmh-input::placeholder {
    color: #9CA3AF;
    opacity: 1;
}

.zmh-subscribe-form .zmh-input:focus {
    outline: none;
    border-color: var(--zmh-primary);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.25);
    background: #FFFFFF;
}

/* Submit — full width, sits directly under input */
.zmh-subscribe-form .zmh-field-submit {
    margin-top: 12px;
}

.zmh-subscribe-form .zmh-submit {
    display: block;
    width: 100%;
    padding: 14px 22px;
    background: var(--zmh-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--zmh-radius);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.zmh-subscribe-form .zmh-submit:hover {
    background: var(--zmh-primary-hover);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.35);
}

.zmh-subscribe-form .zmh-submit:active {
    transform: translateY(1px);
}

.zmh-subscribe-form .zmh-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Messages */
.zmh-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--zmh-radius);
    font-size: 14px;
    line-height: 1.5;
    animation: zmhFadeIn 0.25s ease-out;
}

.zmh-message.success {
    background: rgba(16, 185, 129, 0.15);
    color: #A7F3D0;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.zmh-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Privacy note */
.zmh-privacy {
    margin: 14px 0 0;
    text-align: left;
}

.zmh-privacy small {
    color: var(--zmh-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

/* Style variants — kept, but wrapper stays transparent */
.zmh-style-compact .zmh-subscribe-title {
    font-size: 18px;
    margin-bottom: 14px;
}

.zmh-style-compact .zmh-input,
.zmh-style-compact .zmh-submit {
    padding: 12px 16px;
    font-size: 14px;
}

.zmh-style-minimal .zmh-subscribe-title,
.zmh-style-minimal .zmh-subscribe-description,
.zmh-style-minimal .zmh-privacy {
    display: none;
}

/* Inline variant kept for shortcode users who want side-by-side */
.zmh-style-inline .zmh-subscribe-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.zmh-style-inline .zmh-field {
    margin: 0;
}

.zmh-style-inline .zmh-field-email {
    flex: 1;
    min-width: 200px;
}

.zmh-style-inline .zmh-field-submit {
    flex: 0 0 auto;
    margin-top: 0;
}

.zmh-style-inline .zmh-submit {
    width: auto;
    padding: 14px 26px;
    white-space: nowrap;
}

.zmh-style-inline .zmh-subscribe-title,
.zmh-style-inline .zmh-subscribe-description,
.zmh-style-inline .zmh-privacy {
    display: none;
}

.zmh-style-wide .zmh-subscribe-inner {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.zmh-style-wide .zmh-privacy {
    text-align: center;
}

/* Loading spinner */
.zmh-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.zmh-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: zmhSpin 0.7s linear infinite;
}

@keyframes zmhFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes zmhSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .zmh-subscribe-title {
        font-size: 18px;
    }

    .zmh-style-inline .zmh-subscribe-form {
        flex-direction: column;
    }

    .zmh-style-inline .zmh-field-email,
    .zmh-style-inline .zmh-submit {
        width: 100%;
        min-width: 0;
    }
}
