body, html, ul, ol, li, p, h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    border: 0;
}

body, html {
    background-color: white;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #666;
    padding: 20px;
}

.container1, .container2, .container3, .container4, .container5 {
    background: #f7f9fc;
    max-width: 800px;
    margin: auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    background-color: rgb(255, 255, 255);
}
table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f0f0f0;
    color: #333;
    text-align: left;
}

/* Fixed column widths */
th.dealRef, td.dealRef { width: 15%; }
th.surname, td.surname { width: 20%; }
th.lender, td.lender { width: 20%; }
th.grossBanked, td.grossBanked { width: 22.5%; }
th.netBanked, td.netBanked { width: 22.5%; }
th.action, td.action { width: 10%; }

/* Ensure content does not overflow */
td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Additional styles for input fields in table cells */
table td input {
    margin: 2px 0;
    width: calc(100% - 4px);
    box-sizing: border-box;
}

button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #218838;
}

.container1 h2, .container2 h2, .container3 h2, .container5 h2 {
    color: #003366;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="date"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.form-group select {
    width: 100%; /* Ensures the select element fills the container */
    padding: 10px;
    margin-bottom: 10px; /* Adds spacing below the dropdown for consistency */
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: white;
    color: #666;
    font-family: Arial, sans-serif;
}

/* Optionally, to style the dropdown arrow */
.form-group select {
    -webkit-appearance: none; /* Removes default Chrome and Safari style */
    -moz-appearance: none; /* Removes default Firefox style */
    appearance: none; /* Removes default style for IE */
    background-image: url('dropdown-arrow-image-url'); /* Add your own dropdown arrow image URL */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px; /* Adjust based on your image */
}


@media (min-width: 768px) {
    .form-group {
        flex-direction: row;
        align-items: center;
    }
    .form-group label {
        flex-basis: 20%;
        flex-shrink: 0;
        text-align: right;
        margin-right: 20px;
    }
    .form-group input[type="text"],
    .form-group input[type="date"] {
        flex-grow: 1;
    }
}
.container3 {
    background: #f7f9fc;
    max-width: 800px;
    margin: auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 10px; /* Gap between elements */
}

.container3 h2 {
    color: #003366;
    margin-bottom: 20px;
}

.container3 > div {
    margin-bottom: 10px;
}

.container3 div,
.container3 label {
    color: #555;
    margin-bottom: 5px;
}

.container3 input[type="text"],
.container3 input[type="date"],
.container3 input[type="checkbox"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-right: 5px;
}

.container3 input[type="checkbox"] {
    margin-left: 0;
}

.container3 button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 10px;
}

.container3 button:hover {
    background-color: #218838;
}

/* Style for the free type box */
.container3 input[type="text"].freeTypeBox {
    grid-column: span 2; /* Occupy full width */
}


.container4 {
    background: #f7f9fc;
    max-width: 800px;
    margin: auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.container4 h2 {
    color: #003366;
    margin-bottom: 20px;
}

.container4 > div {
    margin-bottom: 10px;
}

.container4 div,
.container4 label {
    color: #555;
    font-size: 14px;
    margin-bottom: 5px;
}

.container4 input[type="text"],
.container4 input[type="date"],
.container4 input[type="checkbox"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-right: 5px;
}

.container4 input[type="checkbox"] {
    margin-left: 0;
}

.container4 button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.container4 button:hover {
    background-color: #218838;
}

.freeTypeBox {
    width: 400px;
    height: 100px;
}

.calculation-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000; /* Ensure it's above other content */
    width: 80%;
    max-width: 400px;
}

.calculation-popup p,
.calculation-popup ul {
    margin-bottom: 20px;
}

/* Optionally, style the close button as well */
.calculation-popup button {
    display: block;
    margin: 0 auto;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.calculation-popup button:hover {
    background-color: #218838;
}
