/*
 * The modal intentionally uses restrained black/grey input and validation
 * styling so the active WordPress theme can supply the site's normal heading
 * and button treatment.
 */

.kapstadt-modal[hidden] {
    display: none !important;
}

.kapstadt-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 24px;
}

.kapstadt-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .68);
}

.kapstadt-modal__dialog {
    position: relative;
    width: min(960px, 100%);
    max-height: min(92vh, 1000px);
    overflow: auto;
    background: #fff;
    color: #111;
    border-radius: 2px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .25);
    -webkit-overflow-scrolling: touch;
}

.kapstadt-modal__submission-overlay {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, .68);
}

.kapstadt-modal__submission-overlay[hidden] {
    display: none;
}

.kapstadt-modal__submission-state {
    width: min(480px, 100%);
    padding: 28px;
    background: #fff;
    color: #111;
    text-align: center;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .25);
}

.kapstadt-modal__loader {
    display: block;
    width: 42px;
    height: 42px;
    margin: 0 auto 18px;
    border: 4px solid #d3d3d3;
    border-top-color: #111;
    border-radius: 50%;
    animation: kapstadt-modal-loader-spin .8s linear infinite;
}

.is-success .kapstadt-modal__loader {
    display: none;
}

.kapstadt-modal__submission-icon {
    display: none;
    place-items: center;
    width: 50px;
    height: 50px;
    margin: 0 auto 18px;
    border: 3px solid currentColor;
    border-radius: 50%;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.kapstadt-modal__submission-state.is-success .kapstadt-modal__submission-icon {
    color: #19733c;
    display: grid;
}

.kapstadt-modal__submission-state.is-error .kapstadt-modal__submission-icon {
    color: #a32121;
    display: grid;
}

.kapstadt-modal__submission-message {
    margin: 0;
    font-weight: 600;
}

.kapstadt-modal__submission-dismiss {
    margin-top: 20px;
}

.kapstadt-modal__submission-state.is-error .kapstadt-modal__submission-message {
    color: #333;
}

@keyframes kapstadt-modal-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.kapstadt-modal__content {
    padding: clamp(24px, 4vw, 48px);
}

.kapstadt-modal__content h2 {
    margin: 0 42px 10px 0;
}

.kapstadt-modal__intro {
    margin: 0 0 24px;
    color: #555;
}

.kapstadt-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #222;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.kapstadt-form-grid {
    display: grid;
    gap: 18px;
}

.kapstadt-form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kapstadt-field,
.kapstadt-fieldset {
    margin: 0 0 18px;
}

.kapstadt-fieldset {
    border: 0;
    padding: 0;
}

.kapstadt-fieldset > legend {
    width: 100%;
    margin: 0 0 14px;
    padding: 0 0 8px;
    border-bottom: 1px solid #d3d3d3;
    font-weight: 600;
}

.kapstadt-field label {
    display: block;
    margin-bottom: 7px;
    font-size: .95rem;
    font-weight: 500;
}

.kapstadt-field input[type="text"],
.kapstadt-field input[type="email"],
.kapstadt-field input[type="tel"],
.kapstadt-field input[type="url"],
.kapstadt-field input[type="file"],
.kapstadt-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #999;
    border-radius: 2px;
    background: #fff;
    color: #111;
    padding: 11px 12px;
    font: inherit;
}

.kapstadt-field input:focus,
.kapstadt-field textarea:focus,
.kapstadt-signature-pad:focus {
    outline: 2px solid #111;
    outline-offset: 1px;
}

.kapstadt-field textarea {
    resize: vertical;
    min-height: 110px;
}

.kapstadt-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.kapstadt-check {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.kapstadt-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #111;
}

.kapstadt-field__hint {
    margin: 7px 0 0;
    color: #666;
    font-size: .82rem;
}

.kapstadt-field__error {
    display: block;
    min-height: 1.2em;
    margin-top: 6px;
    color: #555;
    font-size: .82rem;
}

.kapstadt-field.has-error input,
.kapstadt-field.has-error textarea,
.kapstadt-fieldset.has-error .kapstadt-signature-pad {
    border-color: #222;
}

.kapstadt-terms {
    border-left: 3px solid #111;
    padding: 4px 0 4px 15px;
    color: #333;
}

.kapstadt-terms p {
    margin: 0 0 9px;
}

.kapstadt-terms p:last-child {
    margin-bottom: 0;
}

.kapstadt-signature-wrap {
    max-width: 800px;
}

.kapstadt-signature-pad {
    display: block;
    width: 100%;
    height: 220px;
    border: 1px solid #999;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}

.kapstadt-signature-clear {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #444;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.kapstadt-social-footer {
    margin: 22px 0;
    padding-top: 18px;
    border-top: 1px solid #ddd;
}

.kapstadt-social-footer__title {
    margin-bottom: 10px;
    font-weight: 600;
}

.kapstadt-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
}

.kapstadt-social-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: inherit;
    text-decoration: none;
    font-size: .88rem;
}

.kapstadt-social-links a:hover,
.kapstadt-social-links a:focus {
    text-decoration: underline;
}

.kapstadt-social-icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid #666;
    border-radius: 50%;
    color: #111;
    font-size: .78rem;
    line-height: 1;
}

.kapstadt-hashtags {
    margin-top: 10px;
    color: #666;
    font-size: .82rem;
}

.kapstadt-form-message {
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid #888;
    color: #222;
    background: #f7f7f7;
}

.kapstadt-form-message.is-error {
    border-color: #333;
    background: #f2f2f2;
}

.kapstadt-form-message.is-success {
    border-color: #555;
    background: #f6f6f6;
}

.kapstadt-form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 8px;
}

.kapstadt-form-actions [disabled] {
    opacity: .6;
    cursor: wait;
}

.kapstadt-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

body.kapstadt-modal-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .kapstadt-modal {
        padding: 0;
        align-items: end;
    }

    .kapstadt-modal__dialog {
        width: 100%;
        max-height: 95vh;
        border-radius: 10px 10px 0 0;
    }

    .kapstadt-form-grid--2,
    .kapstadt-check-grid {
        grid-template-columns: 1fr;
    }

    .kapstadt-modal__content {
        padding: 22px;
    }

    .kapstadt-modal__submission-overlay {
        padding: 20px;
    }
}


.kapstadt-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


#contact .button.kapstadt-accreditation-trigger{
    max-width:100%;
    width: calc(50% - 16px);
}

@media (max-width: 825px) {

    footer .button-wrap{
        width: 100%;
    }
    #contact .button.kapstadt-accreditation-trigger{
        width: 100%;
  
    }


    #contact a.button{
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 292px) {

    #contact .button.kapstadt-accreditation-trigger{
        width: 100%;
    height: auto;
}
}