/* Global Styles for BrowserTools.XYZ */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header.site-header {
    background-color: #007bff;
    color: white;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.site-header .logo a {
    color: white;
    text-decoration: none;
    font-size: 1.8em;
    font-weight: bold;
}

header.site-header nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 1em;
}
header.site-header nav a:hover {
    text-decoration: underline;
}


/* Main index page specific header */
header.main-page-header {
    text-align: center;
    padding: 40px 20px; /* More padding for main page header */
    background-color: #007bff;
    color: white;
    border-radius: 0 0 8px 8px; /* Rounded bottom corners */
}
header.main-page-header h1 {
     margin: 0;
     font-size: 2.8em; /* Larger title for main page */
}
header.main-page-header p.subtitle {
    margin: 10px 0 0;
    font-size: 1.2em;
    opacity: 0.9;
}


nav.breadcrumbs {
    padding: 12px 30px;
    background-color: #e9ecef;
    font-size: 0.95em;
    border-bottom: 1px solid #dee2e6;
}

nav.breadcrumbs a {
    text-decoration: none;
    color: #0056b3;
}

nav.breadcrumbs a:hover {
    text-decoration: underline;
}

nav.breadcrumbs span.current-page {
    color: #495057;
}

main {
    flex-grow: 1;
    width: 100%;
    max-width: 960px; /* Max width for tool content */
    margin: 25px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.tool-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.tool-container h1.tool-title { /* Tool page title */
    margin-top: 0;
    font-size: 2em;
    color: #0056b3;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

/* Form elements styling */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600; /* Slightly bolder labels */
    color: #495057;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    background-color: #f8f9fa; /* Slight background tint for inputs */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="file"]:focus,
.form-group input[type="url"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
    background-color: #fff; /* White background on focus */
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    margin-right: 8px;
    vertical-align: middle;
}

.form-group .checkbox-label,
.form-group .radio-label {
    font-weight: normal;
    font-size: 0.95em;
    vertical-align: middle;
}

.button-group {
    margin-top: 25px;
    display: flex;
    gap: 10px; /* Space between buttons */
}

button, .button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover, .button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

button:active, .button:active {
    transform: translateY(0);
}

button.secondary, .button.secondary {
    background-color: #6c757d;
}
button.secondary:hover, .button.secondary:hover {
    background-color: #545b62;
}

button.success, .button.success { /* Already in previous styles, kept for consistency */
    background-color: #28a745;
}
button.success:hover, .button.success:hover {
    background-color: #1e7e34;
}

button.danger, .button.danger { /* Already in previous styles, kept for consistency */
    background-color: #dc3545;
    color: white !important;
}
button.danger:hover, .button.danger:hover {
    background-color: #b02a37;
}

.output-area {
    background-color: #f8f9fa; /* Consistent with input backgrounds */
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
    min-height: 100px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; /* Monospaced font */
    font-size: 0.9em;
    line-height: 1.5;
}
.output-area.formatted {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    white-space: normal;
    line-height: 1.6;
    font-size: 1em;
}

a {
    color: #0056b3;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

footer a {
    color: #e9ecef;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

footer.site-footer {
    text-align: center;
    padding: 25px;
    background-color: #343a40;
    color: #e9ecef; /* Lighter text color for footer */
    font-size: 0.9em;
    margin-top: auto;
}
footer.site-footer p {
    margin: 0;
}


/* Styles for the main index page tool cards */
/* Main index page specific content area */
main.main-index-page {
    max-width: 1200px; /* Wider for grid display */
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Slightly smaller min for better fit */
    gap: 20px; /* Slightly reduced gap */
}
.tool-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0; /* Lighter border */
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.tool-card h2.tool-card-title { /* Specific class for card titles */
    margin-top: 0;
    font-size: 1.4em;
    color: #0056b3;
    margin-bottom: 12px;
}
.tool-card p.tool-description {
    font-size: 0.9em; /* Slightly smaller text for descriptions */
    margin-bottom: 8px;
    color: #555;
    flex-grow: 1;
}
.tool-card p.tool-description strong {
    color: #343a40;
}
.tool-card a.tool-link {
    display: inline-block;
    margin-top: 15px;
    padding: 9px 16px;
    background-color: #007bff; /* Primary button color */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.95em;
    text-align: center;
    transition: background-color 0.2s ease;
}
.tool-card a.tool-link:hover {
    background-color: #0056b3; /* Darker shade on hover */
}

/* Utility classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

/* Responsive adjustments */
.columns {
    display: flex;
    gap: 20px;
}
.column {
    flex: 1;
    min-width: 0; /* Prevents overflow in flex items */
}
.column.is-two-thirds { flex: 2; }
.column.is-one-third { flex: 1; }


@media (max-width: 768px) {
    header.site-header {
        flex-direction: column;
        padding: 15px;
    }
    header.site-header .logo a {
        font-size: 1.6em;
        margin-bottom: 10px;
        display: block; /* Center logo text */
        text-align: center;
    }
    header.site-header nav {
        margin-top:10px;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    header.site-header nav a {
        margin: 5px 10px;
    }

    header.main-page-header h1 {
        font-size: 2.2em;
    }
    header.main-page-header p.subtitle {
        font-size: 1em;
    }

    nav.breadcrumbs {
        padding: 10px 15px;
        font-size: 0.9em;
    }

    main {
        padding: 0 15px;
        margin-top: 20px;
    }
    .tool-container {
        padding: 20px;
    }
    .tool-container h1.tool-title {
        font-size: 1.6em;
    }

    .columns {
        flex-direction: column;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="number"],
    .form-group input[type="file"],
    .form-group input[type="url"],
    .form-group select,
    .form-group textarea {
        font-size: 0.95em;
    }
    button, .button {
        font-size: 0.95em;
        padding: 10px 15px;
    }
    .button-group {
        flex-direction: column; /* Stack buttons on small screens */
    }
    .button-group button, .button-group .button {
        width: 100%; /* Full width buttons in a stacked group */
    }
    .button-group button:not(:last-child) {
        margin-bottom: 10px; /* Add space between stacked buttons */
    }

    .tools-grid {
        grid-template-columns: 1fr; /* Single column for tool cards */
    }
}

/* Accessibility: Focus visibility */
:focus-visible {
  outline: 2px solid #0056b3;
  outline-offset: 2px;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}
*:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* Tool-specific styles for Favicon Generator */
#imagePreviewContainer {
    margin-top: 15px;
    border: 2px dashed #ced4da;
    padding: 10px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 5px;
}
#imagePreview {
    max-width: 100%;
    max-height: 200px;
    display: block; /* if an image is loaded */
}
#imagePreviewPlaceholder {
    color: #6c757d;
    text-align: center;
}
.favicon-previews {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}
.favicon-previews h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}
.favicon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
}
.favicon-item {
    text-align: center;
}
.favicon-item canvas, .favicon-item img {
    border: 1px solid #ddd;
    padding: 5px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}
.favicon-item p {
    font-size: 0.85em;
    margin-top: 5px;
    color: #495057;
}
.favicon-item .download-link {
    font-size: 0.8em;
    display: block;
    margin-top: 3px;
}
/* End of Favicon Generator specific styles */

.cron-input-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    align-items: end; /* Align items to the bottom for better label-input sync */
}
.cron-input-fields .form-group {
    margin-bottom: 0; /* Remove default bottom margin for tighter grid */
}
.cron-input-fields label {
    font-size: 0.85em;
    margin-bottom: 4px;
}
.cron-input-fields input[type="text"] {
    font-size: 0.9em;
    padding: 8px;
}
#generatedCronExpression {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 4px;
    font-size: 1.1em;
    margin-top: 10px;
    border: 1px solid #ced4da;
}
.explanation-area {
        margin-top: 20px;
}
.explanation-area strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1em;
}
.explanation-area p {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    font-size: 0.95em;
    color: #333;
    line-height: 1.7;
}

/* Tool-specific mini-styles if absolutely necessary */
#audioPlayerElement {
    width: 100%;
    margin-top: 15px;
}
.audio-info {
    margin-top: 15px;
    font-size: 0.9em;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}
.audio-info p {
    margin: 5px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}
.stat-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #dee2e6;
}
.stat-item .label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}
.stat-item .value {
    display: block;
    font-size: 1.6em;
    font-weight: 600;
    color: #0056b3;
}

.palette-category {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e7e7e7;
}
.palette-category h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
    color: #0056b3;
}
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.swatch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}
.swatch {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 5px;
    cursor: pointer;
}
.swatch-code {
    font-size: 0.85em;
    color: #333;
    background-color: #fff;
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid #eee;
}


.accessibility-feature-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}
.accessibility-feature-container h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: #0056b3;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}
.inline-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 1px solid #ccc;
    vertical-align: middle;
    margin-left: 8px;
    border-radius: 4px;
}
#contrastResult {
    padding-top: 10px;
    padding-bottom: 10px;
}
#contrastResult p {
    margin: 8px 0;
    font-size: 0.95em;
    line-height: 1.5;
}
#contrastResult strong {
    font-weight: 600;
    color: #333;
}
#contrastResult .pass { color: #28a745; font-weight: bold; }
#contrastResult .fail { color: #dc3545; font-weight: bold; }

#textPreview {
    font-size: 16px;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    text-align: center;
    margin-top: 10px;
    line-height: 1.5;
}
#textPreviewLarge {
    font-size: 24px;
    font-weight: normal;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    text-align: center;
    margin-top: 10px;
    line-height: 1.5;
}
.small-text-muted {
    font-size: 0.85em;
    color: #6c757d;
}

.explanation-area p {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    font-size: 0.95em;
    color: #333;
    line-height: 1.7;
}

/* SmartConvert Tool Specific Styles */
.manual-conversion-inputs {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 15px; /* Space between items */
    align-items: flex-end; /* Align items to the bottom, useful for button alignment */
}

.manual-conversion-inputs .form-group {
    margin-bottom: 0; /* Override default form-group margin for tighter layout */
    flex-grow: 1; /* Allow items to grow */
}

.manual-conversion-inputs .value-input-group {
    flex-basis: 150px; /* Minimum width for value input */
    flex-grow: 2; /* Value input can take more space */
}

.manual-conversion-inputs .from-unit-group,
.manual-conversion-inputs .to-unit-group {
    flex-basis: 200px; /* Minimum width for unit selects */
    flex-grow: 1.5;
}

.manual-conversion-inputs .swap-button-container {
    flex-grow: 0;
    flex-basis: auto; /* Button takes its natural width */
    padding-bottom: 10px; /* Align button with the bottom of input fields, considering input padding */
}
.manual-conversion-inputs .swap-button-container button {
    padding: 10px; /* Make it squarish if only icon */
    line-height: 1; /* Adjust if text looks off */
}

.or-divider {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 20px;
    margin-bottom: 20px;
    font-weight: bold;
}
/* End of SmartConvert Tool Specific Styles */

/* Word Cloud Generator Tool Specific Styles */
.word-cloud-area {
    width: 100%;
    min-height: 300px; /* Minimum height for the area */
    max-height: 450px; /* Maximum height for the area */
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensure canvas doesn't overflow its container */
    position: relative; /* For positioning placeholder text */
}

#wordCloudCanvas {
    display: block; /* Will be set to block by JS when active */
    max-width: 100%;
    max-height: 100%;
}

#wordCloudPlaceholder {
    text-align: center;
    color: #6c757d;
    font-size: 1em;
    padding: 20px;
}

/* Responsive adjustments for WordLens */
@media (max-width: 768px) {
    .word-cloud-area {
        min-height: 250px;
        max-height: 350px;
    }

    #wordCloudCanvas {
        /* Ensure canvas scales down properly on smaller screens if needed */
    }

    /* Controls column might stack, no specific style needed here yet based on current layout */
}

/* Simple Kanban Tool Specific Styles */
.kanban-controls {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.kanban-board-container {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* Allow horizontal scrolling for many columns */
    padding: 10px 0; /* Padding for scrollbar */
    min-height: 300px; /* Minimum height for the board area */
    scroll-snap-type: x mandatory; /* Added for scroll snapping */
    /* Add a subtle background to the scroll container if not already present */
    background-color: #f8f9fa; /* Or a color that fits your design */
    padding: 15px; /* Add some padding around the columns */
    border-radius: 6px; /* Optional: round corners of the board area */

}

.kanban-column {
    flex: 0 0 300px; /* Fixed width for columns, no shrinking/growing */
    background-color: #e9ecef; /* Light grey background for columns */
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; /* Stack header and tasks vertically */
    max-height: 70vh; /* Max height to prevent overly long columns */
    scroll-snap-align: start; /* Added for scroll snapping */
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ced4da;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.kanban-column-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #343a40;
    word-break: break-word; /* Prevent long titles from breaking layout */
}

.delete-column-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.4em;
    cursor: pointer;
    padding: 0 5px;
}
.delete-column-btn:hover {
    color: #dc3545;
}


.kanban-tasks {
    flex-grow: 1; /* Allow tasks area to take available space */
    overflow-y: auto; /* Scroll for tasks if they overflow column height */
    min-height: 100px; /* Minimum height for the tasks area */
    padding-right: 5px; /* Space for scrollbar */
}
.kanban-tasks.drag-over {
    background-color: #d0d6db; /* Highlight when dragging over */
    outline: 2px dashed #007bff;
}


.kanban-task {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    font-size: 0.95em;
    cursor: grab;
    position: relative; /* For positioning delete button */
    word-wrap: break-word; /* Wrap long task text */
}
.kanban-task:last-child {
    margin-bottom: 0;
}
.kanban-task.dragging {
    opacity: 0.5;
    background-color: #cce5ff; /* Light blue when dragging */
    border-style: dashed;
}

.delete-task-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: #adb5bd;
    font-size: 1.2em;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    display: none; /* Initially hidden */
}
.kanban-task:hover .delete-task-btn {
    display: block; /* Show on hover */
}
.delete-task-btn:hover {
    color: #dc3545; /* Red on hover */
}

/* Responsive adjustments for Kanban */
@media (max-width: 768px) {

    .button-group {
        flex-direction: column; /* Stack buttons on small screens */
    }
    .button-group button,
    .button-group .button,
    .button-group label.button { /* Ensured label.button is included */
        width: 100%; /* Full width buttons in a stacked group */
        box-sizing: border-box; /* Ensures padding/border don't add to width */
    }
    .button-group button:not(:last-child),
    .button-group .button:not(:last-child),
    .button-group label.button:not(:last-child) {
        margin-bottom: 10px; /* Add space between stacked buttons */
    }

    .kanban-board-container {
        flex-direction: column; /* Stack columns vertically */
        overflow-x: hidden; /* Hide horizontal scrollbar */
        overflow-y: auto;   /* Allow vertical scroll for the list of columns */
        scroll-snap-type: none; /* Disable scroll snapping for vertical layout */
        padding: 10px; /* Adjust padding for mobile */
    }
    .kanban-column {
        flex: 1 1 100%; /* Allow columns to take full width when stacked */
        max-width: 100%; /* Ensure they don't exceed container */
        margin-bottom: 20px; /* Add space between stacked columns */
        scroll-snap-align: none; /* Disable for vertical */
        max-height: none; /* Allow columns to be as tall as their content on mobile */
    }
    .kanban-column:last-child {
        margin-bottom: 0;
    }
    .kanban-controls .columns {
        flex-direction: column; /* Stack control groups */
    }
}
/* End of Simple Kanban Tool Specific Styles */

/* Photo Editor Tool Specific Styles */
#imageCanvas {
    display: block; /* Remove extra space below canvas */
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid #ced4da; /* Light border, consistent with inputs */
    border-radius: 5px; /* Rounded corners */
    background-color: #f8f9fa; /* Light background for empty state */
    max-width: 100%; /* Ensure it's responsive */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tool-controls { /* For the file input area */
    margin-bottom: 20px;
    display: flex; /* Align label and input nicely if needed, or just for structure */
    flex-direction: column; /* Stack label on top of input */
    gap: 8px; /* Space between label and input */
}

.processing-controls { /* For buttons like "Make Round", "Download" */
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 10px; /* Space between buttons */
}

/* Style for the &nbsp; if it was wrapped or to control elements around it */
/* No direct style for &nbsp;, but ensuring buttons have good spacing via gap */

#statusMessage {
    margin-top: 15px;
    font-size: 0.95em;
    color: #495057; /* Subdued text color */
    background-color: #e9ecef; /* Light background for emphasis */
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    min-height: 1.5em; /* Ensure it has some height even when empty */
    line-height: 1.5;
}

/* Ensure buttons within processing-controls are not full width by default unless they are in a .button-group that stacks */
.processing-controls button {
    width: auto; /* Override potential full-width from general button stacking rules if not desired here */
}

@media (max-width: 768px) {
    .processing-controls {
        flex-direction: column; /* Stack processing buttons on smaller screens */
    }
    .processing-controls button {
        width: 100%; /* Make buttons full width when stacked */
    }
}
/* End of Photo Editor Tool Specific Styles */

/* Simple Inventory Tool Specific Styles */
.simple-inventory-intro-text {
    margin-bottom: 25px;
}

.simple-inventory-status-heading,
.simple-inventory-results-heading {
    margin-top: 30px;
    margin-bottom: 15px;
}

.simple-inventory-query-section,
.simple-inventory-manage-db-section {
    margin-top: 25px;
}

label[for="query-text"] {
    display: none;
}

.simple-inventory-results-actions {
    margin-bottom: 10px;
}

#results-div { /* Already has classes output-area results-container */
    margin-top: 10px;
}

.simple-inventory-import-db-heading {
    margin-top: 30px;
    margin-bottom: 15px;
}

#import-file-input {
    margin-top: 5px;
}

.simple-inventory-import-db-actions {
    margin-top: 10px;
}
/* End of Simple Inventory Tool Specific Styles */

/* Text Difference Checker Tool Specific Styles */
.diff-added {
    background-color: #e6ffed; /* Light green */
    color: #006400; /* Dark green text */
    text-decoration: none;
}

.diff-removed {
    background-color: #ffeef0; /* Light red */
    color: #8B0000; /* Dark red text */
    text-decoration: line-through;
}

textarea.dragover {
    background-color: #f0f8ff; /* Light blue (AliceBlue) */
    border-color: #007bff; /* Bootstrap primary blue */
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); /* Similar to focus */
}

.diff-line {
    display: flex;
    align-items: flex-start; /* Align line number and content to the top */
    margin-bottom: 1px; /* Small space between lines */
}

.line-number {
    padding-right: 1em;
    color: #888; /* Muted grey for line numbers */
    user-select: none; /* Make line numbers non-selectable */
    text-align: right;
    min-width: 3.5em; /* Accommodate a few digits + padding */
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; /* Monospace for consistent width */
    display: inline-block; /* Takes up space and allows text-align */
    line-height: 1.5; /* Match output-area line-height if possible */
}

.line-content {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    white-space: pre-wrap; /* Preserve whitespace and wrap within this span */
    word-wrap: break-word; /* Break long words */
    flex-grow: 1; /* Allow content to take remaining space */
    line-height: 1.5; /* Match output-area line-height */
}

/* Optional: Subtle background for lines that are purely added or removed */
.line-content.added-line {
    background-color: rgba(220, 255, 220, 0.5); /* Subtle green */
}

.line-content.removed-line {
    background-color: rgba(255, 220, 220, 0.5); /* Subtle red */
}
/* End of Text Difference Checker Tool Specific Styles */

.error-text {
    color: #dc3545; /* Bootstrap danger color */
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.9em;
    white-space: pre-wrap; /* Keep error message formatting */
}

/* Image Compression Tool Specific Styles */
#imagePreviewContainer {
    margin-top: 20px;
    min-height: 200px;
    border: 2px dashed #ced4da; /* Using a variable from existing styles or a common value */
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa; /* Consistent with input backgrounds */
    border-radius: 5px; /* Consistent with other elements */
}

#imagePreview {
    max-width: 100%;
    max-height: 400px; /* Max height for the preview */
    border: 1px solid #dee2e6; /* Subtle border for the image itself */
    border-radius: 4px;
}

#imagePreviewPlaceholder {
    color: #6c757d; /* Muted text color */
    text-align: center;
    font-size: 1em;
}

#imageInfo {
    margin-top: 15px;
    font-size: 0.9em;
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}
#imageInfo p {
    margin: 5px 0;
}
#imageInfo p strong {
    color: #343a40;
}

#compressionOptionsContainer {
    margin-top: 25px;
}
#compressionOptionsContainer h3 {
    margin-bottom: 15px;
    font-size: 1.4em; /* Slightly larger heading for options section */
    color: #0056b3; /* Consistent with tool titles */
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); /* Min width for cards */
    gap: 15px;
}

.option-card {
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.option-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.option-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #0056b3; /* Consistent color */
}

.option-card p {
    font-size: 0.9em;
    margin-bottom: 6px;
    line-height: 1.4;
    color: #495057;
}
.option-card p:last-child {
    margin-bottom: 0;
}

.option-card .reduction-value { /* Class for the reduction percentage span */
    font-weight: bold;
}

.option-card .reduction-value.positive {
    color: #28a745; /* Green for positive reduction */
}

.option-card .reduction-value.neutral {
    color: #6c757d; /* Grey for neutral or no change */
}
/* End of Image Compression Tool Specific Styles */


/* Additional styles specific to this tool if needed */
/* .container class is defined in style.css, specific styles for this tool can go here */
textarea {
    width: 95%;
    min-height: 150px;
    margin-bottom: 10px;
}
.file-input-label {
    display: block;
    margin-bottom: 5px;
}
.output-area {
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    min-height: 100px;
    white-space: pre-wrap; /* Preserve whitespace and newlines */
    word-wrap: break-word; /* Break long words */
}
.button-group button {
    margin-right: 10px;
}
/* Styles for radio buttons to look like actual buttons */
/* Hide the actual radio input */
.radio-options-group .form-check-input[type="radio"] {
    display: none; /* Can also use opacity: 0; position: absolute; pointer-events: none; */
}

/* Style for the labels to look like buttons */
.button-radio-label {
    display: inline-block; /* Or 'block' if they should take full width of a flex item */
    padding: 10px 18px; /* Consistent with .button class */
    border-radius: 5px; /* Consistent with .button class */
    background-color: #b5b5b5;
    color: white;
    border: 1px solid transparent; /* Adding border to prevent size change on selection if selected has border */
    font-size: 1em; /* Consistent with .button class */
    font-weight: 500; /* Consistent with .button class */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-align: center;
    user-select: none; /* Prevent text selection on click */
}

/* Hover effect for unselected button-like labels */
.radio-options-group .form-check-input[type="radio"]:not(:checked) + .button-radio-label:hover {
    /* background-color: #5a6268; */
    transform: translateY(-1px);
}

/* Active (pressed) effect for unselected button-like labels */
.radio-options-group .form-check-input[type="radio"]:not(:checked) + .button-radio-label:active {
    transform: translateY(0);
}

/* Style for the selected state (when radio input is checked) */
.radio-options-group .form-check-input[type="radio"]:checked + .button-radio-label {
    background-color: #007bff; /* Primary button color (blue for selected) */
    color: white;
    /* transform: translateY(-1px); */ /* Optional: keep it slightly raised or not */
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Optional: Focus-visible styling for keyboard navigation for the hidden radio's label */
.radio-options-group .form-check-input[type="radio"]:focus-visible + .button-radio-label {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* Ensure the group itself still lays out correctly */
.radio-options-group {
    display: flex;
    gap: 10px; /* Overwrites the previous 20px, or adjust as needed. 10px is common for .button-group */
    margin-top: 5px;
}

/* Optional: Slightly larger radio buttons if default is too small, adjust as needed */
.form-check-input[type="radio"] {
    width: 1.15em;
    height: 1.15em;
}

/* Ensure labels for radio buttons are clickable and have a pointer */
.radio-label {
    cursor: pointer;
    padding-left: 0.3em; /* Space between radio and its label text */
}

button,
.button-like-link {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 5px;
    text-decoration: none;
    /* display: inline-block; */
    transition: background-color 0.2s;
}

button:hover,
.button-like-link:hover {
    background-color: #0056b3;
}