/* Favicon Generator Tool Styles */

/* Upload area drag and drop effects */
#uploadArea.drag-over {
    border-color: #3b82f6;
    background-color: #eff6ff;
    transform: scale(1.02);
}

/* File list items */
.file-item {
    display: flex;
    align-items: center;
    justify-content: between;
    padding: 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.file-item:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
    margin-bottom: 2px;
}

.file-details {
    color: #6b7280;
    font-size: 12px;
}

.file-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.download-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Loading modal styling */
#loadingModal {
    backdrop-filter: blur(4px);
}

#loadingModal:not(.hidden) {
    display: flex;
}

/* Preview images scaling */
.preview-container {
    position: relative;
    display: inline-block;
}

.preview-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 45%, rgba(59, 130, 246, 0.1) 50%, transparent 55%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-container:hover::after {
    opacity: 1;
}

/* Toast animations */
.toast-enter {
    transform: translateX(100%);
}

.toast-show {
    transform: translateX(0);
}

.toast-exit {
    transform: translateX(100%);
}

/* Toast styling improvements */
#successToast,
#errorToast {
    z-index: 9999 !important;
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
}

#successToast {
    background: linear-gradient(135deg, #10b981, #059669);
}

#errorToast {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Ensure toasts are completely hidden when not shown */
#successToast[style*="translateX(120%)"],
#errorToast[style*="translateX(120%)"] {
    visibility: hidden;
}

/* Ensure toasts are visible when shown */
#successToast[style*="translateX(0)"],
#errorToast[style*="translateX(0)"] {
    visibility: visible;
}

/* Code textarea styling */
#htmlCode,
#manifestCode {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

#htmlCode::-webkit-scrollbar,
#manifestCode::-webkit-scrollbar {
    width: 6px;
}

#htmlCode::-webkit-scrollbar-track,
#manifestCode::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

#htmlCode::-webkit-scrollbar-thumb,
#manifestCode::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#htmlCode::-webkit-scrollbar-thumb:hover,
#manifestCode::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }

    #htmlCode,
    #manifestCode {
        font-size: 12px;
    }
}

/* Animation keyframes */
@keyframes pulse-subtle {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.loading-pulse {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Error states */
.upload-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.error-text {
    color: #dc2626;
}

/* Success states */
.upload-success {
    border-color: #10b981 !important;
    background-color: #ecfdf5 !important;
}

.success-text {
    color: #059669;
}

/* Favicon preview grid enhancements */
.favicon-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
}

.favicon-preview-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.favicon-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.favicon-preview-item::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3b82f6, #6366f1, #8b5cf6);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.favicon-preview-item:hover::before {
    opacity: 1;
}

.favicon-size-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}
