/* ==== Background Styling ==== */
body {
    background-image: url('../assets/background.jpg');
    background-size: cover;
    /* Ensures the image covers the entire background */
    background-position: center;
    /* Centers the image */
    background-repeat: no-repeat;
    /* Prevents the image from repeating */
    background-attachment: fixed;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

/* ==== Typography ==== */
h2,
h3,
label,
p {
    color: white;
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* ==== Form Styling ==== */
form {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 25px;
    border-radius: 15px;
    margin: 30px auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* ==== Button Styling ==== */
button {
    margin: 5px 0;
}

button.btn {
    font-weight: 500;
}

/* Light-colored text on dark bg */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-outline-info {
    color: white;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    color: white;
}

/* ==== File Info + Preview Button ==== */
#fileName {
    margin-top: 10px;
    font-size: 0.9rem;
    color: white !important;
}

/* #previewBtn {
    margin-left: 10px;
} */

/* ==== Output Area ==== */
pre {
    background: #f4f4f4;
    padding: 12px;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 8px;
    white-space: pre-wrap;
}

/* ==== Container Layout ==== */
.container {
    padding: 3rem 1.5rem;
    max-width: 750px;
    /* limit max width on big screens */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* full viewport height */
    margin: 0 auto;
    /* center horizontally */
}

.listcontainer {
    padding: 3rem 1.5rem;
    /* limit max width on big screens */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* full viewport height */
    margin: 0 auto;
    /* center horizontally */
}

/* ==== Card Styling ==== */
.card {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    padding: 1.5rem;
    /* add some inner spacing */
}

.card-title {
    color: white;
    background-color: rgba(255, 255, 255, 0.25);
    padding: inherit;
    width: auto;
    margin: 30px auto;
    max-width: 600px;
}

/* Selected option text */
.select2-container--default .select2-selection--single {
    color: black;
}

/* Dropdown option text (default, hover, and selected) */
.select2-container--default .select2-results__option {
    color: black;
}

.select2-container--default .select2-results__option--highlighted {
    color: black !important;
    /* hover state */
    background-color: #e0e0e0 !important;
    /* light gray background on hover */
}

/* Placeholder (optional) */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: gray;
}

/* Ensure visible borders between rows */
#list tbody tr {
    border-bottom: 1px solid #ccc !important;
}

#list td,
#list th {
    border: 1px solid #ccc !important;
    vertical-align: middle;
}

/* Optional: clean up inner spacing if needed */
#list td {
    padding: 8px;
}

/* ==== Media Queries for Mobile ==== */
@media (max-width: 768px) {
    .container .listcontainer {
        padding: 1rem 1.5rem;
        /* reduce horizontal padding */
    }

    .card {
        margin: 0 3.5rem;
        /* small side margin */
        padding: 1.5rem 1rem;
        /* consistent padding inside card */
    }
}

@media (max-width: 576px) {
    .container .listcontainer {
        padding: 1rem;
    }

    .card {
        margin: 0 0.5rem;
        padding: 1.25rem 0.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    form {
        padding: 15px 10px;
        margin: 15px auto;
    }

    button,
    .btn {
        width: 100%;
    }
}

/* ==== Typography Scaling for Mobile ==== */
@media (max-width: 576px) {
    html {
        font-size: 13px;
        /* Base font size for mobile */
    }

    body {
        font-size: 0.95rem;
    }

    h1,
    h2,
    h3 {
        font-size: 1.25rem;
    }

    label,
    p,
    .form-label {
        font-size: 0.85rem;
    }

    input,
    select,
    textarea,
    .select2-container--default .select2-selection--single {
        font-size: 0.9rem !important;
    }

    .btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    #fileName {
        font-size: 0.75rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    pre {
        font-size: 0.8rem;
    }
}


@media (max-width: 320px) {
    .container .listcontainer {
        /* almost full viewport height */
        padding: 0.75rem 0.5rem;
    }

    .card {
        margin: 0 0.3rem;
        padding: 1rem 0.5rem;
    }

    h2 {
        font-size: 1.4rem;
    }
}