body, html {
    height: 100%;
}

canvas {
    touch-action: none;
}

#login-form {
    width: 50%;
}

.logout-text {
    position: absolute;
    top: 5px;
    left: 5px;
}

.cursor-pointer {
    cursor: pointer;
}

#sign-section {
    width: 50%;
}

#sign-box {
    height: 150px;
    width: 300px;
    border: 2px solid;
}

.sign-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.error-message {
    color: red;
    font-weight: bold;
    font-size: small;
}

.modal-success,
.modal-error {
    position: fixed;
    top: 40px;
    left: 50%;
    min-height: 6rem;
    width: 25rem;
    margin-left: -12.5rem;
    border-radius: 5px;
    z-index: 1;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 5px;
    animation: slideIn 0.3s ease-in;
    box-sizing: border-box;
}

.modal-success {
    background-color: #57cf73;
}

.modal-error {
    background-color: red;
}

.modal-success p,
.modal-error p {
    margin: 0;
}

.modal-success button,
.modal-error button {
    position: absolute;
    color: #1b1b1b;
    background-color: white;
    font-weight: bold;
    bottom: 5px;
    right: 5px;
}

.modal-success button:hover,
.modal-error button:hover {
    background-color: #1b1b1b;
}

.modal-success.hidden,
.modal-error.hidden {
    animation: slideOut 0.7s ease-out forwards;
}

.admin-link {
    color: white;
}

.admin-link:hover {
    color: #ececec;
}

.contract-form {
    width: 60%;
}

.contract-table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    overflow-x: auto;
}

.contract-table-head {
    padding: 3px;
    border-bottom: 1px solid black;
    width: 80%;
}

.table-line {
    height: 80px;
    border-bottom: 1px solid lightgray;
}

.contract-display-button, .contract-start-second-step, .contract-start-third-step, .contract-delete-form {
    display: block;
    position: relative;
}

.contract-display-button img, .contract-delete-button img, .contract-start-second-step img, .contract-start-third-step img {
    height: 20px;
    width: 20px;
}

.contract-delete-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.contract-display-button img:hover, .contract-start-second-step img:hover, .contract-start-third-step img:hover {
    cursor: pointer;
}

.contract-popup {
    display: none;
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    padding: 8px;
    background-color: black;
    color: white;
    border-radius: 8px;
    z-index: 1;
}

.actions-cell {
    height: 70px;
}

.main-logo {
    cursor: pointer;
}

.search-button img, .reset-button img {
    height: 25px;
}

.highlight {
    background-color: yellow;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-completed {
    color: #57cf73;
    font-weight: bold;
}

.status-in-progress {
    color: #57bbcf;
    font-weight: bold;
}

.status-pending {
    color: #d99f23;
    font-weight: bold;
}

.status-e-pending {
    color: #CC5500;
    font-weight: bold;
}

.status-signed {
    color: #f0e32e;
    font-weight: bold;
}

#search-bar {
    display: flex;
    justify-content: space-between;
}

.contract-number-cell, .lastname-cell, .firstname-cell {
    word-wrap: break-word;
}

.client-search-list-item {
    cursor: pointer;
}

#recap-form, #recap-display {
    background-color: #F5F5F5;
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid red;
    padding: 20px;
    border-radius: 9px;
    width: 100%;
}

.recap {   
    display: flex;
    justify-content: space-around;
}

.recap-item {
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.recap-item-title {
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
}

.recap-first-part, .recap-second-part {
    width: 40%;
}

.recap-item-content, .recap-item-title {
    width: 50%;
}

#validate-recap-area {
    width: 100%;
    justify-content: space-around;
}

#validate-recap-area button {
    width: 250px;
}

.gmc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.modal-content {
    background-color: #fff;
    border-radius: 5px;
    max-width: 600px;
    width: 100%;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
}

#close-modal-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@keyframes slideIn {
    from {
      transform: translateY(-100%);
    }
    to {
      transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
      transform: translateY(0);
    }
    to {
      transform: translateY(-600px);
    }
}

@media only screen and (max-width: 767px) { 
    #login-form {
        width: 100%;
    }

    #search-bar {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #search-button, #search-reset {
        width: 50%;
    }

    #contract-number-head, .contract-number-cell {
        display: none;
    }

    #validate-recap-area {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
    
    #validate-recap-area button {
        width: 50%;
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

@media only screen and (max-width: 1024px) {
    h3 {
        text-align: center;
    }

    .recap {
        flex-direction: column;
        align-items: center;
    }

    .recap-first-part, .recap-second-part {
        width: 100%;
    }

    .contract-form {
        width: 100%;
    }

    .contract-form-row {
        display: flex;
        flex-direction: column;
    }

    .sign-container, .car-drawing-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .modal-error,
    .modal-success {
        width: 100%;
        margin-left: 0;
        left: 0;
    }

    #vehicle-head, .vehicle-cell, #date-head, .date-cell {
        display: none;
    }

    .contract-number, .lastname-cell, .firstname-cell {
        word-break: break-all;
        white-space: normal;
    }
}