@tailwind utilities;

body {
    background: linear-gradient(to bottom, #0256b8, #0256b8, rgb(255, 255, 255));
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.card-main {
    border-radius: 20px;
    height: 90%;
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    background-color: white;
}

.card1 {
    border-radius: 20px;
    background-color: whitesmoke;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card2 {
    flex: 1;
    background: linear-gradient(to bottom right, #f0e68c, #ffff00);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    border-radius: 15px;
    margin-bottom: 20px;
    /* Add space between card2 and card3 on small screens */
}

.card3 {
    background-color: whitesmoke;
    flex: 3.5;
    border-radius: 20px;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}




label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

input,
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

.form-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    width: 100%;
}


.form-group {
    flex: 1 1 40%;
    margin: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    box-sizing: border-box;
}


/* Ensure the table container is responsive */
.table-responsive {
    overflow-x: auto;
    /* Enables horizontal scrolling if needed */
    width: 100%;
}

/* Basic table styling */
table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.form-group-address {
    display: flex;
    align-items: start;
    gap: 5px;

}


.declaration-box {
    background-color: #ffffcc;
    /* Light yellow background */
    padding: 15px;
    border: 2px solid #ffd700;
    /* Golden border */
    border-radius: 8px;
    display: flex;
    align-items: start;
    /* Aligns checkbox and text properly */
    gap: 10px;
    /* Spacing between checkbox and text */
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
}

input[type="checkbox"] {
    vertical-align: middle;
}

@media (max-width: 768px) {
    .card-main {
        flex-direction: column;
        /* Stack elements vertically */
        align-items: stretch;
        /* Stretch elements to full width */
    }

    .card2 {
        flex: 0 0 20%;
        /* Occupy full width */
        /* Add margin for spacing */
        order: -1;
        /* Place card2 on top */

    }
    

    .card3 {
        margin: 10px 0;
        /* Add margin for spacing */
        width: 100%;
    }

    h1{
        margin-left: 10pt;
    }

    .card3 form {
        grid-template-columns: 1fr;
        /* Single column on smaller screens */
        width: 100%;
    }

    .card4 {
        grid-template-columns: 1fr;
        /* Single column on smaller screens */
    }

    .card3 button {
        grid-column: span 1;
        /* Span button across one column */
    }

    .full-width-table {
        width: 100%;
    }

    .form-container {
        grid-template-columns: 1fr;
        /* Single column on smaller screens */
    }

    .form-group {
        width: 95%;
        /* Each input takes the full width */
    }
}

.required::after {
    content: " *" !important;
    color: red !important;
    font-weight: bold !important;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    label {
        font-size: 13px; 
    }

    button {
        font-size: 14px;
    }

    h1, h2, h3 {
        font-size: 18px; 
        text-align: center; 
    }

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

    input, select, textarea {
        padding: 10px;
        font-size: 14px; 
    }

    .form-container {
        padding: 10px; 
    }

    button {
        width: 100%;
        margin-top: 15px;
    }

    #submitBtn {
        margin-top: 20px; 
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        padding: 10px;
        border-radius: 5px;
        background-color: #f9f9f9;
    }

    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        border-bottom: 1px solid #ddd;
    }

    td:last-child {
        border-bottom: none;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        flex: 1;
        color: #333;
    }

    td input,
    td button {
        flex: 2;
        width: 100%;
        margin-left: 10px;
    }

    td button {
        margin-top: 10px;
    }

    .card2 img {
        max-width: 60%; /* Scale the image to 60% of its container on smaller screens */
    }
}


@media (min-width: 768px) {
    .card1 {
        flex-direction: row;
    }

    .card2,
    .card3 {
        width: 50%;
        margin-bottom: 0;
    }

    .card2 {
        margin-right: 20px;
    }

}