/* HCP Forms Block — match email signup styles */
.hcp_form_wrapper.newsletter {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin: 20px auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    color: #000;
}

.hcp_form_wrapper .hcp_marketing_content {
    text-align: center;
    margin: 0 0 15px 0;
    color: #333;
}

.hcp_form_heading {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    font-family: inherit;
    color: #000 !important; /* keep heading black regardless of ACF color pickers */
}

.hcp_newsletter_form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hcp_newsletter_form fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hcp_newsletter_form .form-group,
.hcp_newsletter_form .terms-agree,
.hcp_newsletter_form .news-agree {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hcp_newsletter_form label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.hcp_newsletter_form .required {
    color: red !important;
}

.hcp_newsletter_form input[type="text"],
.hcp_newsletter_form input[type="email"],
.hcp_newsletter_form input[type="tel"],
.hcp_newsletter_form input[type="number"],
.hcp_newsletter_form input[type="date"],
.hcp_newsletter_form select,
.hcp_newsletter_form textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.07);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.hcp_newsletter_form input:focus,
.hcp_newsletter_form select:focus,
.hcp_newsletter_form textarea:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.hcp_newsletter_form input:invalid {
    background: rgba(0, 0, 0, 0.07);
}

.hcp_newsletter_form .terms-agree,
.hcp_newsletter_form .news-agree {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
}

/* Validation/error states */
.hcp_newsletter_form .form-group .error {
    border: 2px solid red;
}

.hcp_newsletter_form .field-checkbox.error {
    outline: 2px solid red;
}

#hcp_form_error {
    margin: 0;
}

/* Keep error text red even with broad campaign body color rules */
#hcp_form_error p,
body.single-campaign_page .hcp_form_wrapper #hcp_form_error p {
    color: red !important;
    margin: 0;
}

/* Submission state */
.hcp_form_message {
    display: none;
}

.hcp_form_message.is-active {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hcp-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid rgba(0,0,0,0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: hcp-spin 0.8s linear infinite;
}

@keyframes hcp-spin {
    to { transform: rotate(360deg); }
}

.sailthru-form__submit {
    display: flex;
    justify-content: center;
}

.secondary-button.submit-btn {
    background: #000;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    align-self: stretch;
    width: 100%;
}

.secondary-button.submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(0.9);
}

.secondary-button.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.secondary-button.submit-btn:disabled {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: none;
}

.hcp_privacy_content {
    margin-top: 15px;
    text-align: center;
    font-size: 12px;
    color: #000 !important;
    line-height: 1.4;
}

.hcp_privacy_content p {
    color: #000 !important;
    margin: 0;
}

.hcp_form_wrapper a {
    color: #0073aa !important;
    text-decoration: underline;
}

.hcp_form_wrapper a:hover {
    color: #005a87 !important;
    text-decoration: none;
}

.hcp_form_wrapper a {
    color: #0073aa;
    text-decoration: underline;
}

.hcp_form_wrapper a:hover {
    color: #005a87;
    text-decoration: none;
}

/* Align list checkboxes horizontally like agree/news rows */
.hcp_newsletter_form .form-group.sailthru-form__list,
.hcp_newsletter_form .form-group.sailthru-form__checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.hcp_newsletter_form .sailthru-form__list label,
.hcp_newsletter_form .sailthru-form__checkbox label {
    margin: 0;
    font-weight: 400;
}

/* Screen reader utility */
.sr-only {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    word-wrap: normal !important;
    border: 0;
    overflow: hidden;
    padding: 0;
    width: 1px;
    height: 1px;
}

/* Responsive */
@media (max-width: 600px) {
    .hcp_form_wrapper.newsletter {
        padding: 20px;
        margin: 15px auto;
    }
    
    .hcp_newsletter_form input,
    .hcp_newsletter_form select,
    .hcp_newsletter_form textarea,
    .secondary-button.submit-btn {
        font-size: 14px;
        padding: 10px 12px;
    }
}
