/* HubSpot-Style CSS for Subscription Widget */

/* Reset and Base Styles */
.hubspot-replacement-widget * {
    box-sizing: border-box;
}

.hubspot-replacement-widget {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.4;
    color: #33475b;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Ensure all text is left-aligned by default */
.hubspot-replacement-widget label,
.hubspot-replacement-widget span,
.hubspot-replacement-widget p,
.hubspot-replacement-widget legend {
    text-align: left;
}

/* Form Styles */
.hubspot-replacement-widget .hs-form {
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
}

/* Button Styles */
.hubspot-replacement-widget .hs-button {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    cursor: pointer;
    display: inline-block;
    font-weight: 500;
    line-height: 16px;
    position: relative;
    text-align: center;
    transition: all .15s linear;
    background-color: #383838;
    color: #ffffff;
    border: 1px solid #383838;
    border-radius: 3px;
    font-size: 12px;
    padding: 10px 12px;
    width: 90px;
    height: 38px;
    box-sizing: border-box;
}

.hubspot-replacement-widget .hs-button:hover,
.hubspot-replacement-widget .hs-button:focus {
    background-color: #525252;
    border-color: #525252;
}

.hubspot-replacement-widget .hs-button:active {
    background-color: #2b2b2b;
    border-color: #2b2b2b;
}

/* Label Styles */
.hubspot-replacement-widget label {
    font-size: 14px;
    color: #33475b;
    display: block;
    font-weight: 500;
    line-height: 20px;
    padding-top: 0;
    margin-bottom: 4px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.hubspot-replacement-widget .hs-form-required {
    color: red;
    display: inline;
    margin-left: 2px;
}

/* Input Styles */
.hubspot-replacement-widget .hs-input {
    display: inline-block;
    width: 100%;
    height: 40px;
    padding: 9px 10px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: 22px;
    color: #33475b;
    border: 1px solid #ccc;
    box-sizing: border-box;
    border-radius: 3px;
    background-color: #fff;
}

.hubspot-replacement-widget .hs-input:focus {
    outline: none;
    background-color: #fff;
}

/* Error states */
.hubspot-replacement-widget .hs-input.error {
    border-color: #f2545b;
    color: #33475b;
    background-color: #fff;
}

.hubspot-replacement-widget .hs-input.error:focus {
    border-color: #f2545b;
    background-color: #fff;
}

.hubspot-replacement-widget .hs-input[type=checkbox],
.hubspot-replacement-widget .hs-input[type=radio] {
    cursor: pointer;
    width: 13px;
    height: 13px;
    padding: 0;
    margin: 0 8px 0 0;
    line-height: normal;
    border: 1px solid #ccc;
    background: #fff;
    vertical-align: middle;
    position: relative;
    top: -1px;
    display: inline-block;
    /* Fix for EVT site - restore native checkbox appearance */
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
}

.hubspot-replacement-widget select.hs-input {
    height: 40px;
    padding: 9px 15px;
}

.hubspot-replacement-widget select.hs-input.is-placeholder {
    color: #bfbfbf;
}

.hubspot-replacement-widget select.hs-input.is-placeholder:focus {
    color: #33475b;
}

.hubspot-replacement-widget .hs-input:-moz-placeholder {
    color: #bfbfbf;
}

.hubspot-replacement-widget .hs-input::-webkit-input-placeholder {
    color: #bfbfbf;
}

.hubspot-replacement-widget textarea.hs-input {
    height: auto;
    min-height: 80px;
    resize: vertical;
    padding: 10px 15px;
}


.hubspot-replacement-widget .hs-error-msgs {
    margin: 5px 0 0 0;
    padding: 0;
    list-style: none;
}

.hubspot-replacement-widget .hs-error-msgs .hs-error-msg {
    color: #f2545b;
    font-size: 12px;
    margin: 0;
    padding: 0;
}

/* Field Styles */
.hubspot-replacement-widget .hs-form-field {
    margin-bottom: 18px;
}

.hubspot-replacement-widget .hs-field-desc {
    color: #7c98b6;
    margin: 0px 0px 6px;
    font-size: 11px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Fieldset and Column Layout */
.hubspot-replacement-widget fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    width: 100%;
}

.hubspot-replacement-widget fieldset.form-columns-1 .hs-input {
    width: 100%;
}

.hubspot-replacement-widget fieldset.form-columns-1 .input {
    margin-right: 8px;
}

.hubspot-replacement-widget fieldset.form-columns-2 .hs-form-field {
    width: 50%;
    float: left;
}

.hubspot-replacement-widget fieldset.form-columns-2 .input {
    margin-right: 8px;
}

.hubspot-replacement-widget fieldset.form-columns-3 .hs-form-field {
    width: 33.3%;
    float: left;
}

.hubspot-replacement-widget fieldset.form-columns-3 .input {
    margin-right: 8px;
}

.hubspot-replacement-widget fieldset:after {
    content: "";
    display: table;
    clear: both;
}

/* Checkbox and Radio Lists */
.hubspot-replacement-widget .inputs-list {
    margin: 0 0 5px;
    width: 100%;
    padding-left: 0;
    list-style: none;
}

.hubspot-replacement-widget .inputs-list > li {
    display: block;
    padding: 0;
    width: 100%;
    margin-bottom: 8px;
}

.hubspot-replacement-widget .inputs-list label {
    float: none;
    width: auto;
    padding: 0;
    line-height: 18px;
    white-space: normal;
    font-weight: normal;
    display: inline;
    text-align: left;
}

.hubspot-replacement-widget .hs-form-checkbox-display {
    display: inline-block;
    width: 100%;
    text-align: left;
}

.hubspot-replacement-widget .hs-form-checkbox-display span {
    display: inline;
    text-align: left;
    margin-left: 0;
    vertical-align: middle;
}

.hubspot-replacement-widget .inputs-list.inline-list li {
    vertical-align: top;
    display: inline-block;
    word-wrap: break-word;
    padding-right: 16px;
}

.hubspot-replacement-widget .inputs-list.inline-list.inline-list-2 li {
    width: 50%;
}

.hubspot-replacement-widget .inputs-list.inline-list.inline-list-2 li:nth-child(2n) {
    padding-right: 0;
}

.hubspot-replacement-widget .inputs-list.inline-list.inline-list-3 li {
    width: 33%;
}

.hubspot-replacement-widget .inputs-list.inline-list.inline-list-3 li:nth-child(3n) {
    width: 34%;
    padding-right: 0;
}

/* Checkbox Display */
.hubspot-replacement-widget .hs-form-checkbox-display {
    display: inline-block;
    width: 100%;
    text-align: left;
}

/* Legal Consent Container */
.hubspot-replacement-widget .legal-consent-container {
    margin-bottom: 18px;
}

.hubspot-replacement-widget .legal-consent-container .hs-richtext {
    margin-bottom: 12px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 24px;
    font-size: 14px;
    color: #33475b;
}

.hubspot-replacement-widget .legal-consent-container .hs-richtext a {
    color: #0000EE;
}

.hubspot-replacement-widget .legal-consent-container .hs-richtext a:visited {
    color: #551A8B;
}

.hubspot-replacement-widget .legal-consent-container .field.hs-form-field {
    margin-bottom: 8px;
}

/* Submit Actions */
.hubspot-replacement-widget .hs-submit .actions {
    margin-top: 18px;
    margin-bottom: 18px;
    padding: 17px 0px;
    text-align: left;
}

/* Success Message */
.hubspot-replacement-widget .submitted-message {
    font-size: 16px;
    color: #33475b;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    padding: 20px;
    background: #f0f8f0;
    border-radius: 3px;
    text-align: left;
}

/* Site Header */
.hubspot-replacement-widget .site-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: left;
    color: #33475b;
}

/* Loading State */
.hubspot-replacement-widget.loading {
    opacity: 0.6;
    pointer-events: none;
}

.hubspot-replacement-widget .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #383838;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Hidden Elements */
.hubspot-replacement-widget .hs-hidden {
    display: none !important;
}

/* Privacy consent checkboxes */
.hubspot-replacement-widget .hs-form-booleancheckbox-display {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 8px;
    line-height: 18px;
}

.hubspot-replacement-widget .hs-form-booleancheckbox-display input[type=checkbox] {
    width: 13px;
    height: 13px;
    margin: 2px 8px 0 0;
    flex-shrink: 0;
    position: static;
    /* Fix for EVT site - restore native checkbox appearance */
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
}

.hubspot-replacement-widget .hs-form-booleancheckbox-display span {
    display: inline;
    line-height: 18px;
}

.hubspot-replacement-widget .hs-form-booleancheckbox-display span p {
    display: inline;
    margin: 0;
}

.hubspot-replacement-widget .hs-form-booleancheckbox-display .hs-form-required {
    display: inline;
    color: red;
    margin-left: 2px;
}

/* Field of Interest specific styling */
.hubspot-replacement-widget #field-of-interest-group {
    text-align: left;
    padding: 0;
    margin: 0;
}

.hubspot-replacement-widget #field-of-interest-group li,
.hubspot-replacement-widget .hs-form-checkbox {
    display: block;
    margin-bottom: 10px;
    text-align: left;
    list-style: none;
}

.hubspot-replacement-widget .hs-form-checkbox-display {
    display: inline-block;
    width: 100%;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.hubspot-replacement-widget .hs-form-checkbox-display input[type=checkbox] {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin: 0 8px 0 0;
    padding: 0;
    vertical-align: middle;
    position: relative;
    top: -1px;
    border: 1px solid #ccc;
    background: #fff;
    /* Fix for EVT site - restore native checkbox appearance */
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
}

.hubspot-replacement-widget .hs-form-checkbox-display span {
    display: inline;
    vertical-align: middle;
    text-align: left;
    line-height: 1.4;
}

/* Mobile Responsive */
@media (max-width: 400px), (min-device-width: 320px) and (max-device-width: 480px) {
    .hubspot-replacement-widget fieldset.form-columns-2 .hs-form-field,
    .hubspot-replacement-widget fieldset.form-columns-3 .hs-form-field {
        float: none;
        width: 100%;
    }
    
    .hubspot-replacement-widget fieldset.form-columns-2 .hs-form-field .hs-input,
    .hubspot-replacement-widget fieldset.form-columns-3 .hs-form-field .hs-input {
        width: 95%;
    }
    
    .hubspot-replacement-widget fieldset.form-columns-2 .hs-form-field input[type=checkbox],
    .hubspot-replacement-widget fieldset.form-columns-2 .hs-form-field input[type=radio],
    .hubspot-replacement-widget fieldset.form-columns-3 .hs-form-field input[type=checkbox],
    .hubspot-replacement-widget fieldset.form-columns-3 .hs-form-field input[type=radio] {
        width: auto;
    }
    
    .hubspot-replacement-widget .inputs-list.inline-list.inline-list-2 li,
    .hubspot-replacement-widget .inputs-list.inline-list.inline-list-3 li {
        width: 100%;
        padding-right: 0;
    }
}

/* Submit Button Container */
.hubspot-replacement-widget .hs_submit {
    text-align: left;
}

.hubspot-replacement-widget .hs_submit .actions {
    text-align: left;
}

.hubspot-replacement-widget .hs_submit .actions input {
    width: 90px !important;
}
