/*
 * style.css: Custom styles for the Image Converter tool
 *
 * This version provides a clean, minimal, and modern aesthetic.
 * It uses a simplified color palette, subtle shadows, and a focus on
 * typography to create a professional and user-friendly interface.
 */

/* --- Custom Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- General Layout & Elements --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa; /* Very light gray background */
    color: #343a40; /* Dark gray for main text */
}

/* Container for the main content */
.main-container {
    max-width: 900px; /* Slightly smaller for a tighter feel */
    margin: 3rem auto;
    padding: 2.5rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); /* Softer shadow */
}

/* Main headings */
h1, h2 {
    color: #212529; /* Deep black-like color for headings */
    font-weight: 600;
}

/* Main description text */
.main-description {
    color: #6c757d; /* Lighter gray for descriptions */
}

/* Action buttons */
.action-button {
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Drop Area Styles --- */
.drop-area {
    border-radius: 12px;
}

.drop-area.highlight {
    border-color: #007bff;
    background-color: #e9f5ff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.1);
}

/* --- FAQ Section Styles --- */
.faq-question {
    border: 1px solid #e2e8f0;
}

.faq-question:hover {
    background-color: #f7fafc;
}

.faq-question svg {
    transition: transform 0.3s ease-in-out;
}

.faq-answer {
    line-height: 1.6;
}

/* --- File Preview Grid Styles --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding: 16px;
    background-color: #f1f5f9;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.preview-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
}

.preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-image {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 8px;
}

.preview-filename {
    font-size: 0.875rem;
    color: #4a5568;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.remove-button {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    padding: 4px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.preview-item:hover .remove-button {
    opacity: 1;
}

.remove-button svg {
    color: #ef4444;
}

/* --- Utility Classes for Layout --- */
/* Use this class on an element to remove its top margin. */
.mt-0 {
    margin-top: 0 !important;
}

/* --- Custom Scrollbar Styles --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* --- Custom Message Box Styles --- */
.message-box-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.message-box {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
}
