/* Base styles for the form */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.container {
    margin-top: 20px;
}

.image-container {
    text-align: center;
    margin-bottom: 20px;
}

.card {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.card-body {
    padding: 20px;
}

h5.card-title {
    font-weight: 500;
    margin-bottom: 20px;
}

.policy-list {
    list-style-type: none;
    padding-left: 0;
}

.policy-list li {
    margin-bottom: 10px;
}

.policy-list .text-danger {
    color: #dc3545;
}

/* Custom styles for the checkboxes */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.form-check-input {
    margin-top: 5px;
}

.form-check-label {
    margin-left: 10px;
    font-size: 16px;
}

/* Custom styles for the text input */
.form-outline {
    margin-bottom: 20px;
}

.form-outline .form-control {
    padding: 10px;
    font-size: 16px;
}

.form-outline .form-label {
    font-size: 14px;
    color: #000000;
    /* Ensuring visibility in light mode */
}

/* Custom styles for the canvas */
#sig-canvas {
    border: 2px solid #ccc;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Custom styles for the buttons */
.btn {
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 8px;
}

#sig-submitBtn {
    background-color: #007bff;
    color: white;
    border: none;
    margin-right: 10px;
}

#sig-clearBtn {
    background-color: #6c757d;
    color: white;
    border: none;
}

.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover {
    opacity: 0.8;
}

/* Custom styles for the textarea and image */
textarea#sig-dataUrl {
    font-size: 14px;
    resize: none;
}

img#sig-image {
    display: block;
    margin-top: 20px;
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* Dark theme styles */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #ffffff;
    }

    .card {
        background-color: #1e1e1e;
        color: #ffffff;
    }

    .form-control {
        background-color: #2c2c2c;
        color: #ffffff;
    }

    .form-check-input {
        background-color: #2c2c2c;
        border-color: #ffffff;
    }

    .form-check-label {
        color: #ffffff;
    }

    #sig-canvas {
        border: 2px solid #555555;
        background-color: #2c2c2c;
    }

    textarea#sig-dataUrl {
        background-color: #2c2c2c;
        color: #ffffff;
        border: 1px solid #555555;
    }

    img#sig-image {
        border: 1px solid #555555;
    }

    .btn {
        color: white;
    }

    #sig-submitBtn {
        background-color: #0d6efd;
    }

    #sig-clearBtn {
        background-color: #6c757d;
    }

    .btn-success {
        background-color: #198754;
    }

    /* Ensure headers and labels are visible */
    h5.card-title,
    .card-text,
    .form-label {
        color: #ffffff;
    }

    /* Specific style for the signer's name and date labels */
    #signer-name+.form-label,
    #sign-date+.form-label {
        color: #ffffff;
    }

    /* Specific style for text-danger */
    .policy-list .text-danger {
        color: #ff6b6b;
    }

    /* Style for the calendar icon */
    input[type="date"]::-webkit-calendar-picker-indicator {
        filter: invert(1);
    }
}

/* Mobile styles */
@media (max-width: 767.98px) {
    .container {
        margin-top: 10px;
    }

    #sig-canvas {
        width: 100%;
        height: auto;
    }
}