/**
 * CSG Newsletter Widget Styles
 *
 * @package CsgPersonalized
 * @since   1.0.1
 */

/* Section container */
.csg-el-newsletter {
    position: relative;
    background: #f8fafc;
    padding: 80px 24px;
    text-align: center;
    overflow: hidden;
}

/* Background overlay */
.csg-el-newsletter__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(30, 136, 229, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Content wrapper */
.csg-el-newsletter__content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

/* Icon */
.csg-el-newsletter__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--csg-primary, #D4AF37);
    font-size: 48px;
    margin-bottom: 24px;
}

.csg-el-newsletter__icon i,
.csg-el-newsletter__icon svg {
    font-size: inherit;
    width: 1em;
    height: 1em;
}

/* Title */
.csg-el-newsletter__title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--csg-dark, #0f172a);
    margin: 0 0 12px 0;
}

/* Description */
.csg-el-newsletter__desc {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #64748b;
    margin: 0 0 32px 0;
}

/* Form wrapper */
.csg-el-newsletter__form {
    margin: 0;
}

/* Input + Button row */
.csg-el-newsletter__form-field {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.csg-el-newsletter__form-field input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 14px 24px;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    color: var(--csg-dark, #0f172a);
    outline: none;
}

.csg-el-newsletter__form-field input[type="email"]::placeholder {
    color: #94a3b8;
}

/* Submit button */
.csg-el-newsletter__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--csg-secondary, #0B1C2C), var(--csg-primary, #D4AF37));
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.csg-el-newsletter__btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.csg-el-newsletter__btn svg {
    flex-shrink: 0;
}

/* Note text */
.csg-el-newsletter__note {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin: 12px 0 0 0;
}

/* ── CF7 Integration ──────────────────────────────────── */
.csg-el-newsletter__form .wpcf7 {
    max-width: 480px;
    margin: 0 auto;
}

.csg-el-newsletter__form .wpcf7 .csg-cf7-newsletter {
    display: flex;
    gap: 0;
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.csg-el-newsletter__form .wpcf7 .csg-cf7-newsletter p {
    margin: 0;
}

.csg-el-newsletter__form .wpcf7 .csg-cf7-newsletter p:first-child {
    flex: 1;
    min-width: 0;
}

.csg-el-newsletter__form .wpcf7 input[type="email"] {
    width: 100%;
    padding: 14px 24px;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    color: var(--csg-dark, #0f172a);
    outline: none;
    box-sizing: border-box;
}

.csg-el-newsletter__form .wpcf7 input[type="email"]::placeholder {
    color: #94a3b8;
}

.csg-el-newsletter__form .wpcf7 input[type="submit"] {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    border: none;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--csg-secondary, #0B1C2C), var(--csg-primary, #D4AF37));
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.csg-el-newsletter__form .wpcf7 input[type="submit"]:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.csg-el-newsletter__form .wpcf7-response-output {
    margin: 12px auto 0 !important;
    max-width: 480px;
    border-radius: 8px !important;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .csg-el-newsletter {
        padding: 64px 20px;
    }

    .csg-el-newsletter__title {
        font-size: 1.75rem;
    }

    .csg-el-newsletter__desc {
        font-size: 1rem;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .csg-el-newsletter {
        padding: 48px 16px;
    }

    .csg-el-newsletter__title {
        font-size: 1.5rem;
    }

    .csg-el-newsletter__form-field {
        flex-direction: column;
        border-radius: 12px;
        gap: 8px;
        border: none;
        background: transparent;
    }

    .csg-el-newsletter__form-field input[type="email"] {
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 9999px;
        background: #ffffff;
        padding: 14px 20px;
    }

    .csg-el-newsletter__btn {
        width: 100%;
        justify-content: center;
    }

    .csg-el-newsletter__form .wpcf7 .csg-cf7-newsletter {
        flex-direction: column;
        gap: 8px;
        border: none;
        overflow: visible;
    }

    .csg-el-newsletter__form .wpcf7 input[type="email"] {
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 9999px;
        background: #ffffff;
        padding: 14px 20px;
    }

    .csg-el-newsletter__form .wpcf7 input[type="submit"] {
        width: 100%;
        border-radius: 9999px;
        justify-content: center;
    }
}
