/* Apply border-box sizing universally */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    /* Apply Roboto font, with sans-serif as fallback */
    font-family: 'Roboto', sans-serif;
    font-weight: 400; /* Default to regular weight */
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333; /* Default text color */
}

.container {
    max-width: 700px;
    margin: 20px auto;
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #333;
    text-align: center;
    margin-bottom: 1em;
    font-weight: 700; /* Use the bold weight */
}

h1 {
    margin-bottom: 1.5em;
}

section {
    margin-bottom: 30px;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0;
}

/* Styles for the Drop Zone */
.drop-zone {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    color: #aaa;
    cursor: pointer;
    margin-bottom: 15px;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    overflow: hidden;
}

.drop-zone p#dropZoneText {
    margin: 0;
    pointer-events: none;
    padding: 15px;
}

.drop-zone.dragover {
    border-color: #2BDAEC;
    background-color: #f8f9fa;
    color: #333;
}

/* Image Preview Styles */
.image-preview-container {
    position: relative;
    max-width: 100%;
    max-height: 250px;
    line-height: 0;
}

#imagePreview {
    display: block;
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 4px;
}

.close-preview-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    font-weight: bold;
    transition: background-color 0.2s ease;
    z-index: 10;
    font-family: sans-serif;
}

.close-preview-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Textarea styling */
textarea#qrText {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease; /* Add transition */
}

/* Textarea focus style */
textarea#qrText:focus {
    border-color: #2BDAEC; /* Use primary color for border */
    box-shadow: 0 0 0 3px rgba(43, 218, 236, 0.55); /* Optional glow effect */
    outline: none; /* Remove default browser outline */
}


/* General Button Styling (excluding close button) */
button:not(.close-preview-btn) {
    background-color: #2BDAEC;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 4px;
    font-size: 1rem;
    padding: 10px 20px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

button:not(.close-preview-btn):hover {
    background-color: #1FAAB8;
}

/* Download Button specific styles */
.download-btn {
     /* Default hidden via inline style in HTML */
}

/* Container to center the download button */
.button-container {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
}


/* Result Box Styling (used by reader and generator output) */
.result-box {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    min-height: 50px;
    word-wrap: break-word;
}

/* Style text within the reader result */
#readerResult {
    color: #333; /* Ensure non-link text uses default dark color */
}

#readerResult a {

    text-decoration: none;
}
#readerResult a:hover {

    text-decoration: underline;
}


/* QR Code Generator Output Area Specifics */
.qrcode-container {
    padding: 10px;
    min-height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
}

#qrcode {
    /* Centering handled by flex container */
}

#qrcode img,
#qrcode canvas {
    max-width: 100%;
    display: block;
}

.error-box {
    color: #dc3545;
    margin-top: 10px;
    font-weight: bold;
}

footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9em;
    color: #666;
}

/* Basic Responsive Adjustments */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    .drop-zone {
        padding: 10px;
        min-height: 80px;
    }
     .image-preview-container, #imagePreview {
        max-height: 180px;
     }
    textarea#qrText {
        min-height: 70px;
    }
    .qrcode-container {
        min-height: 180px;
    }
}

/* --- Add these styles to your existing style.css --- */

#faq {
    margin-top: 40px; /* Add space above FAQ section */
    padding-top: 20px;
    border-top: 1px solid #eee; /* Add a light separator line */
}

#faq h2 {
    margin-bottom: 1.5em; /* Space below FAQ heading */
}

#faq dl {
    margin-left: 0; /* Remove default indentation for definition list */
}

#faq dt {
    font-weight: 700; /* Make questions bold */
    margin-top: 1.2em; /* Space above each question */
    color: #333;
}

#faq dd {
    margin-left: 0; /* Remove default indentation for answers */
    margin-bottom: 1.2em; /* Space below each answer */
    color: #555; /* Slightly lighter color for answers */
    padding-left: 1em; /* Indent answer slightly for readability */
    border-left: 2px solid #eee; /* Add a subtle left border */
}

#faq dd strong {
    color: #444; /* Optional: Highlight the emphasized security text */
}

/* --- End of FAQ styles --- */