/* Styles specific to the Favicon Previewer Tool */

/* Upload Section - Reuse styles from other tools like thumbnail-safe-zones or logo-scale-checker */
.upload-section {
    text-align: center;
    margin-bottom: 2rem;
}

#drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

#drop-zone.drag-over {
    border-color: var(--accent-color);
    background-color: rgba(0, 123, 255, 0.05); /* Light blue tint */
}
body.dark-mode #drop-zone.drag-over {
    background-color: rgba(102, 191, 255, 0.1); /* Light blue tint for dark mode */
}

#drop-zone p {
    color: var(--text-color);
    opacity: 0.8;
    pointer-events: none; /* Allow clicks to pass through */
}

#file-input {
    display: none; /* Hide the default input */
}

.file-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: var(--bg-color-light); /* Light text on button */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
}
body.dark-mode .file-label {
    color: var(--bg-color-dark); /* Dark text on button in dark mode */
}

.file-label:hover {
    opacity: 0.9;
}

#upload-status {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--error-text); /* Use global error color */
    min-height: 1.4em; /* Reserve space */
}

/* Preview Section */
#preview-container {
    margin-top: 1rem;
    /*padding-top: 1.5rem;*/
    /*border-top: 1px solid var(--border-color);*/
}

#preview-container.hidden {
    display: none;
}

#preview-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    color: var(--text-color);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjust minmax as needed */
    gap: 2rem;
    align-items: start;
}

.preview-box {
    text-align: center;
}

.preview-box label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--label-text);
}

/* Chrome Tab Styles */
.chrome-tab {
    display: flex;
    align-items: center;
    padding: 6px 10px 6px 8px;
    border-radius: 8px 8px 0 0;
    margin: 0 auto; /* Center the tab */
    width: 282px; /* Fixed width for tab preview */
    height: 36px; /* Fixed height */
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chrome-light {
    background-color: #dfe1e5; /* Approximate Chrome light tab color */
    color: #3c4043;
    border-bottom: 1px solid #bdbdbd;
}
body.dark-mode .chrome-light { /* Style light tab in dark mode */
     background-color: #4d5154; /* A slightly darker grey for context */
     color: #e8eaed;
     border-bottom: 1px solid #636363;
}

.chrome-dark {
    background-color: #3c4043; /* Approximate Chrome dark tab color */
    color: #e8eaed;
    border-bottom: 1px solid #5f6368;
}
 body.dark-mode .chrome-dark { /* Style dark tab in dark mode */
     background-color: #202124; /* Standard dark bg */
     color: #e8eaed;
     border-bottom: 1px solid #5f6368;
}

.tab-icon-area {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-icon-area img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tab-text {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    margin-right: 10px;
}

.tab-close {
    font-size: 14px;
    font-weight: bold;
    opacity: 0.7;
    cursor: default;
    padding: 0 4px;
    border-radius: 50%;
    line-height: 1;
}
.chrome-light .tab-close:hover { background-color: rgba(0,0,0,0.1); }
.chrome-dark .tab-close:hover { background-color: rgba(255,255,255,0.1); }


/* App Icon Preview Styles */
.app-icon-preview-box {
    /* Add specific styles if needed, e.g., adjust vertical alignment */
}
.app-icon-container {
    width: 86px; /* Example size */
    height: 86px;
    border-radius: 18px; /* Example rounding */
    background-color: var(--preview-bg); /* Use preview background */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto; /* Center the icon */
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-icon-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Or contain, depending on desired effect */
}


/* Responsive Adjustments */
@media (max-width: 600px) {
    .preview-grid {
        grid-template-columns: 1fr; /* Stack previews on small screens */
        gap: 1.5rem;
    }
     .chrome-tab {
         width: 90%; /* Make tabs wider on small screens */
         max-width: 282px;
     }
     .app-icon-container {
        width: 86px;
        height: 86px;
        border-radius: 18px;
     }
}