/* WPKD Forms - frontend */
.wpkd-form-wrap,
.wpkd-form-wrap * {
    box-sizing: border-box;
}

.wpkd-form-wrap {
    width: 100%;
    max-width: 760px;
    margin: 1.5rem 0 2rem;
    clear: both;
}

.wpkd-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
}

.wpkd-form > * {
    grid-column: 1 / -1 !important;
    min-width: 0;
}

.wpkd-field {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
    position: relative;
}

.wpkd-field > label:not(.wpkd-checkbox-label) {
    display: block !important;
    width: 100% !important;
    margin: 0 0 0.45rem !important;
    padding: 0 !important;
    float: none !important;
    font-weight: 600;
    line-height: 1.4;
}

.wpkd-field input[type="text"],
.wpkd-field input[type="email"],
.wpkd-field textarea {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
    clear: both !important;
    padding: 0.7rem 0.8rem !important;
    border: 1px solid #767676;
    border-radius: 3px;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.45;
}

.wpkd-field textarea {
    min-height: 10rem;
    resize: vertical;
}

.wpkd-field input[type="text"]:focus,
.wpkd-field input[type="email"]:focus,
.wpkd-field textarea:focus,
.wpkd-checkbox-label input[type="checkbox"]:focus,
.wpkd-submit-button:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.wpkd-checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    line-height: 1.45;
    cursor: pointer;
}

.wpkd-checkbox-label input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.15rem !important;
    height: 1.15rem !important;
    margin: 0.15rem 0 0 !important;
}

.wpkd-required {
    font-weight: 700;
}

/* Honeypot: ska finnas kvar för spamskyddet men aldrig synas för besökaren. */
.wpkd-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.wpkd-gdpr-box {
    width: 100%;
    margin: 0.25rem 0 0;
    padding: 1rem 1.1rem;
    border: 1px solid #c7c7c7;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.025);
}

.wpkd-gdpr-text > :first-child,
.wpkd-form-intro > :first-child,
.wpkd-form-notice > :first-child {
    margin-top: 0;
}

.wpkd-gdpr-text > :last-child,
.wpkd-form-intro > :last-child,
.wpkd-form-notice > :last-child {
    margin-bottom: 0;
}

.wpkd-gdpr-link {
    margin: 0.7rem 0 0.9rem;
}

.wpkd-gdpr-consent-label {
    margin-top: 0.85rem !important;
}

.wpkd-form-submit {
    margin: 0 !important;
    padding: 0 !important;
}

.wpkd-submit-button {
    display: inline-block;
    min-height: 2.75rem;
    padding: 0.65rem 1.25rem;
    border: 1px solid currentColor;
    border-radius: 3px;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.wpkd-submit-button[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
}

.wpkd-form-notice {
    width: 100%;
    margin: 0 0 1.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid #767676;
    border-left-width: 4px;
}

.wpkd-form-success {
    border-left-color: #2e7d32;
}

.wpkd-form-error {
    border-left-color: #b32d2e;
}

@media (max-width: 600px) {
    .wpkd-form-wrap {
        max-width: 100%;
    }

    .wpkd-form {
        gap: 1rem !important;
    }

    .wpkd-field input[type="text"],
    .wpkd-field input[type="email"],
    .wpkd-field textarea {
        font-size: 16px;
    }
}
