/* Withdrawal from the contract (withdrawal.php). Fields and button as in the customer forms
   (gfx/pol/create_account.css, gfx/pol/product_return.css), one column like a legal request form. */

.withdrawal-page {
    max-width: 710px;
    box-sizing: border-box;
    padding: 12px 15px 48px;
    font-family: 'Open Sans', sans-serif;
    color: #2d2329;
    text-align: left;
}

.withdrawal-page h1 {
    margin: 8px 0 14px;
    font-family: 'Lato', sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: #2d2329;
}

.withdrawal-intro p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.6;
    color: #3d3238;
}

.withdrawal-intro a {
    color: #a64273;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.withdrawal-required {
    margin: 18px 0 22px;
    font-size: 14px;
    color: #5b4d55;
}

.withdrawal-alert {
    margin: 0 0 20px;
    padding: 12px 14px;
    font-size: 14px;
    color: #b3261e;
    background: #fdf1f0;
    border-radius: 8px;
}

/* fields */
.withdrawal-field {
    margin: 0 0 20px;
}

.withdrawal-field > label {
    display: block;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #2d2329;
}

.withdrawal-hint {
    display: block;
    margin: -2px 0 8px;
    font-size: 13px;
    line-height: 1.45;
    color: #6b5c64;
}

.withdrawal-field input[type=text],
.withdrawal-field input[type=email],
.withdrawal-field input[type=tel],
.withdrawal-field textarea,
.withdrawal-field select {
    display: block;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 12px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px; /* 16px keeps iOS from zooming in on focus */
    line-height: normal;
    color: #222;
    background-color: #fff;
    border: 1px solid #cfc4ca;
    border-radius: 8px;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.withdrawal-field textarea {
    height: auto;
    min-height: 120px;
    padding: 12px;
    line-height: 1.45;
    resize: vertical;
}

.withdrawal-field textarea[name=reason] {
    min-height: 84px;
}

.withdrawal-field select {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236d5f67' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.withdrawal-field input:focus,
.withdrawal-field textarea:focus,
.withdrawal-field select:focus {
    border-color: #a64273;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(166, 66, 115, .18);
}

.withdrawal-field [aria-invalid=true] {
    border-color: #c0392b;
}

.withdrawal-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #c0392b;
}

/* "I confirm the withdrawal" */
.withdrawal-confirm {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 4px 12px;
    align-items: start;
    margin-top: 26px;
}

.withdrawal-confirm input[type=checkbox] {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: #017e68;
}

.withdrawal-confirm > label {
    margin: 0;
    font-weight: 700;
    line-height: 1.45;
    cursor: pointer;
}

.withdrawal-confirm .withdrawal-error {
    grid-column: 2;
    margin-top: 0;
}

.withdrawal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-top: 8px;
    padding: 0 28px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    background: #017e68;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}

.withdrawal-button:hover,
.withdrawal-button:focus {
    color: #fff;
    background: #016a57;
    text-decoration: none;
}

.withdrawal-button:focus-visible {
    outline: 2px solid #2d2329;
    outline-offset: 2px;
}

/* a field for bots only */
.withdrawal-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* after sending */
.withdrawal-done {
    padding: 28px 28px 32px;
    background: #f2f8f6;
    border: 1px solid #cfe5df;
    border-radius: 12px;
}

.withdrawal-done h1 {
    margin-top: 0;
    color: #016a57;
}

.withdrawal-done p {
    font-size: 15px;
    line-height: 1.6;
}

.withdrawal-done dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 20px;
    margin: 18px 0;
    font-size: 15px;
}

.withdrawal-done dt {
    font-weight: 700;
}

.withdrawal-done dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media only screen and (max-width: 767px) {
    .withdrawal-page {
        padding: 4px 11px 36px; /* + 5px of .container = 16px from the edge */
    }

    .withdrawal-page h1 {
        font-size: 24px;
    }

    .withdrawal-button {
        width: 100%;
    }

    .withdrawal-done {
        padding: 22px 18px 24px;
    }

    .withdrawal-done dl {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .withdrawal-done dd {
        margin-bottom: 8px;
    }
}
