﻿/* ===== Base Page ===== */
body {
    font-family: 'Quicksand', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
}

.radiobutton-container {
    max-width: 90%;
    display: block;
    position: relative;
    padding-left: 20px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    .radiobutton-container input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        width: 0px;
        height: 0px;
        line-height: 0px;
    }

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 15px;
    width: 15px;
    background-color: white;
    border: 1px solid black;
    border-radius: 50%;
}

.radiobutton-container:hover input ~ .checkmark, .radiobutton-container:hover input ~ .checkmark2 {
    background-color: #F5F4F1;
    cursor: pointer;
}

.radiobutton-container input:checked ~ .checkmark, .radiobutton-container input:checked ~ .checkmark2 {
    background-color: white;
    cursor: pointer;
}

.checkmark:after, .checkmark2:after {
    content: "";
    position: absolute;
    display: none;
}

.radiobutton-container input:checked ~ .checkmark:after, .radiobutton-container input:checked ~ .checkmark2:after {
    display: block;
}

.radiobutton-container .checkmark:after {
    top: 2px;
    left: 2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: black;
}

.checkmark2 {
    position: absolute;
    top: 0;
    left: 0;
    height: 15px;
    width: 15px;
    background-color: white;
    border: 1px solid black;
    border-radius: 2%;
}

.radiobutton-container .checkmark2::after {
    content: "";
    position: absolute;
    display: none;
    top: 2px;
    left: 2px;
    width: 9px;
    height: 9px;
    background-image: url("/check-2x.png");
    background-repeat: no-repeat;
    background-size: contain;
}
/* ===== Form Wrapper (controls the 70% width) ===== */
.form-wrapper {
    width: 70%;
    max-width: 900px;
    margin: 2rem auto;
}

/* ===== Main Form ===== */
.owner-change-form {
    width: 100%;
    padding: 1rem 1.5rem;
}

    /* ===== Headings ===== */
    .owner-change-form h2 {
        margin: 2rem 0 1rem;
        font-size: 1.6rem;
        font-weight: 500;
        color: #0f2748;
    }

        .owner-change-form h2:first-child {
            margin-top: 0;
        }

    /* ===== Divider ===== */
    .owner-change-form hr {
        margin: 1.5rem 0;
        border: none;
        border-top: 1px solid #e7e7e7;
    }

/* ===== Field Group ===== */
.field-group {
    margin-bottom: 1.2rem;
}

    /* ===== Labels ===== */
    .field-group label,
    .date-label {
        display: block;
        margin-bottom: 0.3rem;
        font-size: 0.8rem;
        font-weight: 500;
        color: #1a2f4d;
    }

.required-star {
    color: #ff2f2f;
    font-weight: 700;
}

/* ===== Inputs ===== */
.field-group input:not([type="radio"]),
.field-group select,
.field-group textarea {
    width: 100%;
    height: 2.4rem;
    border: 1px solid #4c5768;
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
    color: #202632;
    background-color: #fff;
    box-sizing: border-box;
}

/* ===== Validation ===== */
.field-group .validation-message {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #e50000;
}

/* ===== Grid Layouts ===== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.action-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.action-row .submit-button {
    margin-top: 0;
}

.action-row-right {
    margin-left: auto;
}

.payer-grid .field-group {
    margin-bottom: 0.9rem;
}

.inline-field-action {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    align-items: end;
}

.inline-field-action .submit-button {
    margin-top: 0;
    height: 2.4rem;
}

.right-actions {
    display: flex;
    justify-content: flex-end;
}

.right-actions .submit-button {
    margin-top: 0.4rem;
}

/* ===== Button ===== */
.submit-button {
    margin-top: 1.2rem;
    padding: 0.5rem 1.2rem;
    background-color: #f0f0f0;
    border-style: none;
    color: #1a2f4d;
    font-size: 0.9rem;
    font-weight: lighter;
    cursor: pointer;
    border-radius: 4px;
}

    .submit-button:hover {
        background-color: #e2e2e2;
    }

    .submit-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* ===== Status Messages ===== */
.status-message {
    margin-top: 0.8rem;
    font-weight: 600;
    font-size: 0.85rem;
}

    .status-message.success {
        color: #1f7a1f;
    }

    .status-message.error {
        color: #a21919;
    }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .form-wrapper {
        width: 90%;
    }

    .three-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 530px) {
    .two-col,
    .three-col {
        grid-template-columns: 1fr;
    }

    .action-row-right {
        margin-left: 0;
    }

    .inline-field-action {
        grid-template-columns: 1fr;
    }
}
/* ===== Unified Form Styles ===== */
.form-page {
    max-width: 980px;
    width: calc(100% - 48px);
    margin: 0 auto;
    padding: 12px 0 24px;
    color: #001d4e;
    font-family: Arial, Helvetica, sans-serif;
}

.form-title {
    margin: 0 0 12px;
    font-size: 44px;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0.2px;
}

.form-info-box {
    border: 1px solid #c7c7c7;
    background: #f2f2f2;
    padding: 12px 16px;
    margin-bottom: 22px;
    font-size: 20px;
    line-height: 1.25;
}

.form {
    font-size: 16px;
    line-height: 1.18;
}

.form-row {
    gap: 16px;
    margin-bottom: 10px;
}

.form-row > label {
    text-align: right;
    line-height: 1.1;
}

.form-input {
    width: 100%;
    max-width: 100%;
    height: 40px;
    border: 1px solid #98a0ae;
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 16px;
    line-height: 1.1;
    color: #001d4e;
    background: #fff;
    outline: none;
}

.form-select {
    appearance: auto;
    padding-right: 10px;
}

.form-textarea {
    min-height: 84px;
    height: auto;
    border-radius: 14px;
    resize: vertical;
}

.form-input-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-subtitle {
    margin: 26px 0 14px;
    color: #0d3c7b;
    font-size: 30px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.1;
}

.form-required-note,
.form-responsibility-note {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.2;
}

.form-checkbox-row {
    margin: 12px 0 18px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 15px;
    line-height: 1.22;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.form-checkbox-row a {
    color: #001d4e;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.form-checkbox-row a::after {
    content: "↗";
    margin-left: 5px;
    font-size: 0.8em;
    position: relative;
    top: -1px;
}

.form-submit-button {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #d95bff;
    cursor: pointer;
}

.form-submit-button:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.form-status-message {
    margin-top: 13px;
    font-size: 15px;
    font-weight: 600;
}

.form-status-message.success {
    color: #18843f;
}

.form-status-message.error {
    color: #b31a1a;
}

.form-energy-row,
.form-radio-row,
.form-upload-row,
.form-inline-button-row,
.form-security-row,
.form-checkbox-note-row,
.form-location-index-row,
.form-contract-row,
.form-input-with-button {
    align-items: start;
}

.form-energy-text,
.form-location-index-text {
    line-height: 1.15;
    padding-top: 3px;
}

.form-location-index-text {
    font-weight: 700;
}

.form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 1px;
}

.form-radio-option {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    line-height: 1.12;
}

.form-radio-option input[type="radio"] {
    width: 22px;
    height: 22px;
    margin: 0;
}

.form-inline-input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 610px;
}

.form-inline-input-actions > .form-input {
    width: 430px;
    flex: 0 1 auto;
}

.form-small-action,
.form-magenta-button {
    border: 1px solid #b6bcc4;
    background: #eceff1;
    border-radius: 999px;
    color: #3a4656;
    padding: 4px 10px;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.form-magenta-button {
    border: none;
    color: #fff;
    background: #d95bff;
}

.form-contract-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.form-right-action {
    margin-left: auto;
}

.form-help-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: #eceff1;
    color: #3a4656;
    font-weight: 700;
    font-size: 12px;
}

.form-upload-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-file {
    width: 430px;
    max-width: 100%;
    font-size: 14px;
}

.form-upload-plus {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: #d95bff;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.form-checkbox-row-inline {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding-top: 2px;
}

.form-security-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.form-security-content strong {
    font-weight: 700;
    line-height: 1.1;
}

.form-security-input {
    width: 180px;
}

.auth-logout-link {
    font-size: small;
    vertical-align: super;
}

.attachment-remove-link {
    cursor: pointer;
    border: none;
    background: transparent;
    color: #001d4e;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    margin-left: 8px;
}

@media (max-width: 1100px) {
    .form-page {
        width: calc(100% - 24px);
        margin: 0 12px;
        padding: 8px 0 16px;
    }

    .form-title {
        font-size: 30px;
        margin-bottom: 10px;
    }

    .form-info-box {
        font-size: 16px;
        padding: 10px 12px;
        margin-bottom: 16px;
    }

    .form-input {
        width: 100%;
        height: 40px;
        font-size: 15px;
        border-radius: 18px;
    }

    .form-textarea {
        min-height: 72px;
        border-radius: 14px;
    }

    .form-subtitle {
        font-size: 22px;
        margin: 17px 0 11px;
    }

    .form-required-note,
    .form-responsibility-note,
    .form-checkbox-row,
    .form-status-message {
        font-size: 14px;
    }

    .form-checkbox {
        width: 17px;
        height: 17px;
        margin-top: 3px;
    }

    .form-submit-button {
        font-size: 16px;
        padding: 10px 16px;
    }

    .form-row > label {
        text-align: left;
    }

    .form-inline-input-actions {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .form-inline-input-actions > .form-input,
    .form-file {
        width: 100%;
    }

    .form-right-action {
        margin-left: 0;
    }
}

/* ===== Tuusulanjärven Lämpö inspired form theme =====
   Shared by the customer-service forms.  Kept separate from Index.razor's
   listing styles so the service landing page remains unchanged. */
body {
    color: #222;
    background-color: #f7f4ef;
    font-family: "Lexend Deca", "Helvetica Neue", Arial, sans-serif;
}

.form-page {
    --tjl-ink: #222;
    --tjl-olive: #494902;
    --tjl-sage: #627d47;
    --tjl-ochre: #bc8526;
    --tjl-sand: #ebe2d4;
    --tjl-line: #d4c3aa;
    max-width: 1120px;
    width: calc(100% - 64px);
    margin: 42px auto 56px;
    padding: 48px clamp(24px, 5vw, 64px) 56px;
    box-sizing: border-box;
    color: var(--tjl-ink);
    background: #fff;
    border-top: 6px solid var(--tjl-olive);
    box-shadow: 0 12px 30px rgba(73, 73, 2, 0.08);
    font-family: inherit;
}

.form-title {
    margin: 0 0 24px;
    color: var(--tjl-ink);
    font-size: clamp(2rem, 4vw, 2.375rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.form-info-box {
    margin: 0 0 38px;
    padding: 18px 22px;
    border: 0;
    border-left: 6px solid var(--tjl-ochre);
    background: var(--tjl-sand);
    color: var(--tjl-ink);
    font-size: 1rem;
    line-height: 1.7;
}

.form {
    font-size: 1rem;
    line-height: 1.75;
}

.form h2:not(.form-subtitle),
.form .wpcf7 h2 {
    margin: 0 0 10px;
    color: var(--tjl-ink);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.form .wpcf7 {
    margin: 0 0 36px;
    padding: 24px;
    border: 1px solid var(--tjl-line);
    background: #fbfaf7;
}

.form .wpcf7 p {
    margin: 0 0 16px;
}

.form-row {
    display: grid;
    grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin: 0 0 18px;
}

.form-row > label,
.form > .form-radio-group > label,
.form > label,
.form > div > label:not(.form-radio-option) {
    color: var(--tjl-ink);
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
}

.form-input,
.form-date-input,
.form-page input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
.form-page select,
.form-page textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    border: 1px solid #aaa789;
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--tjl-ink);
    background: #fff;
    box-shadow: none;
    font: inherit;
    line-height: 1.35;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.form-page select {
    padding-right: 34px;
}

.form-textarea,
.form-page textarea {
    min-height: 132px;
    border-radius: 22px;
    resize: vertical;
}

.form-page input:focus,
.form-page select:focus,
.form-page textarea:focus {
    border-color: var(--tjl-sage);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(98, 125, 71, .18);
}

.form-subtitle {
    margin: 44px 0 22px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--tjl-line);
    color: var(--tjl-olive);
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    font-style: normal;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.form-subtitle em {
    font-style: normal;
}

.required-star {
    color: #a65318;
}

.form-input-unit {
    gap: 12px;
}

.form-input-unit > span {
    color: #5b5b51;
    font-weight: 500;
}

.form-radio-row,
.form-upload-row,
.form-inline-button-row,
.form-checkbox-note-row,
.form-location-index-row,
.form-contract-row,
.form-input-with-button,
.form-textarea-row {
    align-items: start;
}

.form-radio-group {
    gap: 10px;
    padding-top: 2px;
}

.form > div > .form-radio-group {
    margin: 8px 0 24px;
}

.form-radio-option {
    gap: 10px;
    color: var(--tjl-ink);
}

.form-radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--tjl-sage);
}

.form-inline-input-actions {
    max-width: none;
    gap: 10px;
}

.form-inline-input-actions > .form-input {
    width: auto;
    flex: 1 1 280px;
}

.form-small-action,
.form-magenta-button {
    border: 1px solid var(--tjl-olive);
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--tjl-olive);
    background: transparent;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.2;
    transition: color .18s ease, background-color .18s ease;
}

.form-small-action:hover,
.form-magenta-button:hover {
    color: #fff;
    background: var(--tjl-olive);
}

.form-upload-wrap {
    gap: 12px;
}

.form-file,
.form-page input[type="file"] {
    width: 100%;
    max-width: 100%;
    padding: 10px 0;
    color: var(--tjl-ink);
    font: inherit;
}

.form-page input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: 1px solid var(--tjl-olive);
    border-radius: 999px;
    padding: 9px 15px;
    color: var(--tjl-olive);
    background: #fff;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.form-checkbox-row,
.form-checkbox-row-inline {
    gap: 10px;
    color: var(--tjl-ink);
}

.form-checkbox {
    accent-color: var(--tjl-sage);
}

.form-checkbox-row a,
.attachment-remove-link,
.auth-logout-link {
    color: var(--tjl-olive);
}

.form-checkbox-row a::after {
    color: var(--tjl-ochre);
}

.form-required-note,
.form-responsibility-note {
    color: #55554d;
    line-height: 1.6;
}

.form-submit-button {
    margin-top: 14px;
    border: 0;
    border-radius: 999px;
    padding: 14px 24px;
    color: #fff;
    background: var(--tjl-olive);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .01em;
    box-shadow: none;
    transition: background-color .18s ease, transform .18s ease;
}

.form-submit-button:hover:not(:disabled) {
    background: var(--tjl-ochre);
    transform: translateY(-1px);
}

.form-status-message.success {
    color: #3d683b;
}

.form-status-message.error {
    color: #a65318;
}

@media (max-width: 760px) {
    .form-page {
        width: calc(100% - 24px);
        margin: 20px auto 32px;
        padding: 32px 20px 38px;
    }

    .form-info-box {
        margin-bottom: 28px;
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 7px;
        margin-bottom: 16px;
    }

    .form-subtitle {
        margin-top: 34px;
    }

    .form .wpcf7 {
        margin-bottom: 28px;
        padding: 18px;
    }

    .form-inline-input-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-inline-input-actions > .form-input {
        width: 100%;
        flex-basis: auto;
    }

    .form-small-action,
    .form-magenta-button {
        align-self: flex-start;
    }
}




