/* General body and container styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    padding-top: env(safe-area-inset-top, 0);
}

.container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Logo and Headings */
.logo {
    height: 48px;
    width: auto;
    vertical-align: middle;
    margin-right: 16px;
    display: inline-block;
}
h1 {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

h1, h2 {
    color: #333;
}

.invoice-name {
    font-size: 2em;
    font-weight: bold;
    color: #0168b3;
    margin-top: 0.8em;
    margin-bottom: 1em;
}

/* Error styling */
.error-main {
    color: red;
    text-align: center;
    margin-top: 2em;
}

/* Table styling for invoice */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.invoice-table th,
.invoice-table td {
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 8px;
}

.invoice-table th {
    background: #f8f8f8;
    text-align: left;
}

.invoice-table tfoot th,
.invoice-table tfoot td {
    border-top: 2px solid #333;
    background: #fafafa;
    font-weight: bold;
}

/* Form styling */
form#invoice-form {
    margin: 0 auto;
}

form#invoice-form label {
    margin-top: 15px;
    display: block;
}

form#invoice-form input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.1rem;
}

/* Signature pad styling */
.signature-label {
    display: block;
    margin-bottom: 0.3em;
    font-weight: bold;
}

.signature-area {
    margin: 1em 0;
}


.disclaimer-heading {
    font-weight: bold;
    margin-bottom: 5px;
}
.disclaimer {
    margin-bottom: 10px;
}

#signature-pad,
.signature-pad {
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    height: 250px;
    background: #fff;
    margin-bottom: 10px;
    display: block;
}

.signature-buttons {
    margin-bottom: 1em;
}

/* Button styling */
button,
input[type="submit"] {
    background-color: #0168b3;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
    background-color: #015a8b;
}

a.button {
    display: inline-block;
    background-color: #0168b3;
    color: white !important;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1em;
}
a.button:hover {
    background-color: #015a8b;
}

/* Error and success messages */
.error-message {
    color: #c00;
    margin: 10px 0;
    padding-left: 0px;
    list-style-type: none;
}

.success-message {
    color: #0168b3;
    margin: 10px 0;
}

.success-message.already-signed {
    color: #0168b3;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    form#invoice-form {
        max-width: 100%;
    }
    .invoice-table th,
    .invoice-table td {
        padding: 8px 4px;
    }
}