@import url('../global.v3.css');

/* Form Elements */

@supports(-webkit-appearance: none) or (-moz-appearance: none) {
    input[type='checkbox'],
    input[type='radio'] {
      -webkit-appearance: none;
      -moz-appearance: none;
      -webkit-appearance: none;
      -moz-appearance: none;
      outline: none;
      vertical-align: top;
      position: relative;
      cursor: pointer;
      border: 1px solid lightgrey;
      background: white;
      -webkit-transition: background 0.3s, border-color 0.3s;
      -o-transition: background 0.3s, border-color 0.3s;
      transition: background 0.3s, border-color 0.3s
    }
  }
  
input[type='radio'] {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

input[type='checkbox'] {
    width: 20px;
    height: 20px;
    border-radius: 5px;
}

input[type='text'], input[type='tel']  {
    height: 40px;
    padding: 0 5px;
    font-size: 14px;
    width: 50%;
}

#contact-submit {
    display: block;
    -webkit-appearance: none;
    color: var(--blue);
    background-color: var(--blue);
    text-decoration: none;
    padding: 15px 50px;
    font-size: 14px;
    margin: 0 auto 25px auto;
    border-radius: 10px; 
    color: white;
    border: none;
    transition: opacity 0.3s;
    -webkit-transition: opacity 0.3s;
    -o-transition: opacity 0.3s;
}

#contact-submit:hover {
    opacity: 0.8;
    cursor: pointer;
}

input[type='checkbox']:checked,
input[type='radio']:checked {
  background: var(--blue);
  border: none;
}


.radio-button, .checkbox-button {
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.checkmark:after, .tick:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-button input:checked ~ .checkmark:after,
.checkbox-button input:checked ~ .tick:after {
    display: block;
}

.radio-button .checkmark:after {
    top: 9px;
    left: 9px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
}

.checkbox-button .tick:after {
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/* Page Styling */

main, .main-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.main-content {
    padding-right: 0;
}

#contact-form {
    padding: 50px;
    border: 1px solid lightgrey;
    border-radius: 20px;
    margin: 50px;
}

#services {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

#services label {
    vertical-align: sub;
}

#contact-details {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 150px 1fr;
    grid-template-columns: 150px 1fr;
    -ms-grid-rows: 50% 10px 50%;
    grid-template-rows: 50% 50%;
    row-gap: 10px;
    margin-bottom: 30px;
}

#contact-details > *:nth-child(1) {
    -ms-grid-row: 1;
    -ms-grid-column: 1;
}

#contact-details > *:nth-child(2) {
    -ms-grid-row: 1;
    -ms-grid-column: 2;
}

#contact-details > *:nth-child(3) {
    -ms-grid-row: 3;
    -ms-grid-column: 1;
}

#contact-details > *:nth-child(4) {
    -ms-grid-row: 3;
    -ms-grid-column: 2;
}

#contact-details label {
    height: 40px;
}

#contact {
    margin-bottom: 30px;
}

#best-contact-time {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    margin: 10px 0;
}

#best-contact-time label:not(.checkbox-button) {
    height: auto;
    margin-right: 10px;
}

#contact-date {
    width: 150px;
    height: 30px;
    margin-right: 10px;
}

#contact-time {
    width: 130px;
    height: 30px;
    margin-right: 30px;
}

#asap-button {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

#asap-button label:not(.checkbox-button) {
    margin-left: 10px;
}

#job-description {
    margin-bottom: 30px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
}

#description {
    resize: vertical;
    max-height: 300px;
    min-height: 100px;
    padding: 10px;
}

#job-description label {
    margin: 10px 0;
}

#date-required {
    width: 200px;
    height: 30px;
}

.urgent-contact {
    text-align: center;
    font-style: italic;
    font-size: 14px;
}

.notice .row {
    justify-content: center;
}

.notice .col-6 {
    background: rgba(18, 47, 118, 0.25);
    border-left: 4px solid var(--blue);
    color: var(--blue);
    display: flex;
    align-items: center;
    padding: 1rem;
}

.notice .col-6 p {
    margin-bottom: 0;
    margin-left: 20px
}

.notice .col-6 i {
    font-size: 1.5rem;
}

/* Mobile View */

@media screen and (max-width: 890px) {
    main {
        margin: 10px !important;
    }

    input[type='text'], input[type='tel'] {
        width: 100%;
    }

    #contact-form {
        width: 100%;
        padding: 0;
        margin: 0;
        border: none;
    }

    #services {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        font-size: 18px;
        margin-bottom: 1rem !important;
    }

    #services > label {
        margin-bottom: 20px;
    }

    #services label {
        vertical-align: middle;
    }

    #service-type {
        flex-direction: column;
    }

    #service-type > div {
        margin-bottom: 10px;
    }

    #service-type label {
        font-size: 1rem;
        margin-bottom: 0;
    }

    #contact-details {
        -ms-grid-columns: 0.7fr;
        grid-template-columns: 0.7fr;
        grid-template-rows: repeat(2, 0.5fr 1fr);
    }

    #contact-details > *:nth-child(1) {
        -ms-grid-row: 1;
        -ms-grid-column: 1;
    }

    #contact-details > *:nth-child(2) {
        -ms-grid-row: 2;
        -ms-grid-column: 1;
    }

    #contact-details label {
        height: 20px !important;
    }

    #contact-details input {
        margin-bottom: 10px;
    }

    #contact {
        margin-bottom: 20px;
    }

    #best-contact-time {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        -webkit-box-align: start;
            -ms-flex-align: start;
                align-items: flex-start;
    }

    #best-contact-time label:not(.checkbox-button) {
        margin-right: 0;
        margin-bottom: 10px;
    }

    #contact-date {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    #contact-time {
        margin-right: 0;
        margin-bottom: 30px;;
    }

    #contact-submit {
        font-size: 1rem;
    }
}