/* PSG Newsletter Widget Styles - Updated card design */

/* Container card */
.widget_psg_newsletter_widget,
.psg-newsletter-widget {
    background-color: #1a2c4e !important; /* existing dark blue */
    color: #fff;
    margin: 30px 0px 0px 0px;
    padding: 22px;                 /* added padding to make it a card */
    border-radius: 12px;          /* rounded corners */
    box-shadow: 0 8px 20px rgba(12, 25, 40, 0.12); /* subtle soft shadow */
    border: 1px solid rgba(255,255,255,0.03);
    overflow: hidden;
}

/* Widget title styling with elegant yellow underline */
.widget_psg_newsletter_widget .widget-title,
.psg-newsletter-widget .widget-title {
    color: #ffffff !important;
    margin: 0 0 18px 0;
    font-size: 30px;            /* larger title like the screenshot */
    line-height: 1.02;
    font-weight: 800;
    display: inline-block;
    position: relative;
    padding-bottom: 12px;       /* space for the underline */
    letter-spacing: -0.5px;
}

/* Yellow underline (stylish) */
.widget_psg_newsletter_widget .widget-title::after,
.psg-newsletter-widget .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 6px;                /* thickness of the underline */
    width: 64px;                /* length of the underline */
    background: #ffc107;        /* yellow */
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(255,193,7,0.12);
}

/* Description text */
.psg-newsletter-description {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 20px;
}

/* Form layout */
.psg-newsletter-form .form-group {
    display: flex;
    position: relative;
    align-items: center;
}

/* Input */
.psg-newsletter-form input[type="email"] {
    width: 100%;
    padding: 14px 140px 14px 18px; /* more vertical padding for balanced card look */
    border-radius: 10px;           /* softer round */
    border: 1px solid rgba(74,90,126,0.45);
    background-color: #233454;     /* slightly lighter than container for contrast */
    color: #cfdff4;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

/* Input focus */
.psg-newsletter-form input[type="email"]:focus {
    border-color: #ffc107;
    outline: 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08), 0 0 0 4px rgba(255,193,7,0.06);
}

/* Placeholder color */
.psg-newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

/* Submit button */
.psg-newsletter-form button[type="submit"],
.psg-newsletter-submit {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: 124px;
    padding: 0 18px;
    background-color: #ffc107;
    color: #1a2c4e;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .12s ease, box-shadow .12s ease;
    box-shadow: 0 6px 18px rgba(26,44,78,0.12);
}

/* Hover state */
.psg-newsletter-form button[type="submit"]:hover,
.psg-newsletter-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(26,44,78,0.14);
    background-color: #ffcd49;
}

/* Spinner & loading */
.psg-newsletter-form button[type="submit"] .spinner,
.psg-newsletter-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(26, 44, 78, 0.25);
    border-top-color: #1a2c4e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Loading states */
.psg-newsletter-form.loading .submit-text,
.psg-newsletter-form.loading .psg-newsletter-submit .submit-text {
    display: none;
}
.psg-newsletter-form.loading .spinner,
.psg-newsletter-submit.loading .spinner {
    display: block;
}

/* Response messages */
.psg-newsletter-response,
#psg-newsletter-response {
    margin-bottom: 15px;
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 8px;
    display: none;
}
.psg-newsletter-response.success,
#psg-newsletter-response.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}
.psg-newsletter-response.error,
#psg-newsletter-response.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Small screens adjustments */
@media (max-width: 720px) {
    .widget_psg_newsletter_widget,
    .psg-newsletter-widget {
        padding: 18px;
        border-radius: 10px;
    }

    .widget_psg_newsletter_widget .widget-title,
    .psg-newsletter-widget .widget-title {
        font-size: 22px;
    }

    .psg-newsletter-form input[type="email"] {
        padding-right: 120px;
    }

    .psg-newsletter-form button[type="submit"],
    .psg-newsletter-submit {
        width: 110px;
        font-size: 16px;
    }
}

/* spinner animation */
@keyframes spin {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}