/* Reset Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #F5F5F5;
    color: #212121;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    margin-bottom: 16px;
}

h1 {
    margin-top: 60px; /* Increase top margin */
    font-size: 32px;
}

h2 {
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 28px;
}

p {
    margin-top: 16px;
    margin-bottom: 16px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background-color: #616161;
    color: #FFFFFF;
    padding: 10px 0;
}

.header-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    color: #FFFFFF;
    font-size: 24px;
    text-decoration: none;
    font-weight: 500;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 400;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    background-color: #FFFFFF;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100%;
        background-color: #616161;
        width: 80%;
        max-width: 300px;
        transition: right 0.3s ease;
        flex-direction: column;
        padding-top: 60px;
        z-index: 1000;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav ul li {
        margin: 20px 0;
        text-align: center;
    }

    .hamburger {
        display: flex;
    }

    .header-container {
        justify-content: space-between;
    }
}

/* Buttons */
button, .button {
    background-color: #03DAC5;
    color: #212121;
    border: none;
    padding: 12px 24px;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 20px;
}

button:hover, .button:hover {
    background-color: #029e87;
}

button::after, .button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

button:hover::after, .button:hover::after {
    left: 0;
}

/* Forms */
form input[type="text"],
form select,
form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #CCCCCC;
    border-radius: 4px;
    font-size: 18px;
}

form label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
    font-size: 18px;
}

.error-message, .alert {
    padding: 10px;
    margin-bottom: 16px;
    border-radius: 4px;
}

.error-message {
    background-color: #FFCDD2;
    color: #B71C1C;
}

.alert {
    background-color: #C8E6C9;
    color: #1B5E20;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #EEEEEE;
    white-space: nowrap;
}

table th {
    background-color: #F5F5F5;
    font-weight: 500;
    font-size: 18px;
}

table tr:hover {
    background-color: #FAFAFA;
}

table td {
    vertical-align: top;
    font-size: 16px;
}

.sale-history-table td.note-column {
    max-width: 200px;
    word-wrap: break-word;
}

/* Responsive Table Adjustments */
@media (max-width: 767px) {
    table th, table td {
        font-size: 14px;
        padding: 8px;
    }

    button, .button {
        padding: 10px 20px;
        font-size: 16px;
    }

    body {
        font-size: 14px;
    }
}

/* Link Styles */
a {
    color: #616161;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3700B3;
}

/* Miscellaneous */
.section {
    margin-bottom: 40px;
}

.section h2 {
    margin-top: 10px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 16px;
}

.align-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 30px; /* Add margin-top for spacing */
}

.toggle-switch {
    display: flex;
    align-items: center;
}

.toggle-switch input[type="radio"] {
    display: none;
}

.toggle-switch label {
    padding: 10px 20px;
    margin-left: 5px;
    border-radius: 4px;
    cursor: pointer;
    color: #FF0000;
    font-size: 18px;
}

.payment-label.card-label {
    background-color: #006400; /* Dark Green */
}

.payment-label.cash-label {
    background-color: #00008B; /* Dark Blue */
}

.toggle-switch input[type="radio"]:checked + label {
    opacity: 0.9;
    font-size: 30px; /* Increase font size for selected label */
}

#grand-total-text {
    font-size: 28px; /* Same as h2 */
    font-weight: bold;
    color: #333333; /* Dark grey */
    margin-top: 20px;
}

/* Adjustments for better spacing */
main.container {
    margin-top: 20px;
}

h1 {
    margin-top: 20px;
    margin-bottom: 20px; /* Increase margin-bottom */
    font-size: 32px;
}

h2 {
    margin-top: 40px; /* Increase margin-top */
    margin-bottom: 20px;
    font-size: 28px;
}

form#barcode-form {
    display: flex;
    align-items: center;
    margin-bottom: 40px; /* Increase margin-bottom */
}

form#barcode-form input[type="text"] {
    flex: 1;
    margin-right: 10px;
}

form#barcode-form button {
    padding: 10px 20px;
    font-size: 18px;
}

#basket-summary p {
    font-size: 18px;
    margin-top: 10px;
    margin-bottom: 10px;
}

label.section-heading, h2.section-heading {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

#basket {
    margin-top: 40px; /* Increase margin-top */
}

/* Footer */
footer {
    background-color: #616161;
    color: #FFFFFF;
    padding: 10px 0;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}
