/* favicon-generator.css - Styles for the Favicon Generator Tool */

.favicon-generator-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Upload Card */
.upload-card {
    margin-bottom: 1.5rem;
}

.upload-zone {
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--gray-100);
}

.dark-theme .upload-zone {
    background: var(--gray-800);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.05);
}

.upload-zone.dragover {
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-content h3 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.upload-formats {
    font-size: 0.85rem;
    color: var(--text-lighter);
}

/* Upload Preview */
.upload-preview {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 12px;
}

.dark-theme .upload-preview {
    background: var(--gray-800);
}

.preview-image-container {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: repeating-conic-gradient(#ccc 0% 25%, white 0% 50%) 50% / 16px 16px;
    flex-shrink: 0;
}

.preview-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-info {
    flex: 1;
}

.preview-info p {
    margin: 0 0 0.5rem;
    color: var(--text-color);
}

#file-name {
    font-weight: 600;
    font-size: 1.1rem;
}

#file-dimensions {
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-secondary {
    padding: 8px 16px;
    font-size: 0.9rem;
    color: var(--text-color);
    background: var(--gray-200);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark-theme .btn-secondary {
    background: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.dark-theme .btn-secondary:hover {
    background: var(--gray-600);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Options Card */
.options-card {
    margin-bottom: 1.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.option-group h4 {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.option-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
}

.option-row input[type="color"] {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
}

.option-row input[type="color"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sizes-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.sizes-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark-theme .sizes-checkboxes label {
    background: var(--gray-800);
}

.sizes-checkboxes label:hover {
    background: var(--gray-200);
}

.dark-theme .sizes-checkboxes label:hover {
    background: var(--gray-700);
}

.size-use {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-left: auto;
}

.generate-actions {
    text-align: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    margin: 1rem auto;
    overflow: hidden;
}

.dark-theme .progress-bar {
    background: var(--gray-700);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #2ecc71);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Results Section */
.results-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Favicons Grid */
.preview-card {
    margin-bottom: 1.5rem;
}

.favicons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.favicon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.dark-theme .favicon-item {
    background: var(--gray-800);
}

.favicon-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.favicon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: repeating-conic-gradient(#ccc 0% 25%, white 0% 50%) 50% / 10px 10px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.favicon-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.favicon-size {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.favicon-name {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    word-break: break-all;
}

/* Download Card */
.download-card {
    margin-bottom: 1.5rem;
}

.download-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--gray-100);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dark-theme .download-btn {
    background: var(--gray-800);
}

.download-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.download-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    border-color: transparent;
    color: white;
}

.download-btn.primary:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.download-icon {
    font-size: 2rem;
}

.download-title {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}

.download-btn.primary .download-title {
    color: white;
}

.download-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.download-btn.primary .download-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Code Card */
.code-card,
.manifest-card {
    margin-bottom: 1.5rem;
}

.code-card .card-header,
.manifest-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-block {
    background: var(--gray-100);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 0;
    border: 1px solid var(--border-color);
}

.dark-theme .code-block {
    background: var(--gray-800);
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-color);
    white-space: pre;
    line-height: 1.6;
}

/* Info Cards */
.info-card {
    margin-bottom: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 10px;
}

.dark-theme .info-item {
    background: var(--gray-800);
}

.info-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.info-item p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Included List */
.included-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.included-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 10px;
}

.dark-theme .included-item {
    background: var(--gray-800);
}

.included-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.included-info strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.included-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* Content Sections */
.content-section {
    line-height: 1.8;
}

.content-section p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.content-section strong {
    color: var(--primary-color);
}

/* Sizes Table */
.sizes-table-wrapper {
    overflow-x: auto;
}

.sizes-reference {
    width: 100%;
    border-collapse: collapse;
}

.sizes-reference th,
.sizes-reference td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.sizes-reference th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--text-color);
}

.dark-theme .sizes-reference th {
    background: var(--gray-800);
}

.sizes-reference td {
    color: var(--text-color);
}

.sizes-reference td:first-child {
    color: var(--primary-color);
    font-weight: 600;
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item-full {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-item-full:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item-full h4 {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.faq-item-full p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-zone {
        padding: 2rem 1rem;
    }

    .upload-icon {
        font-size: 3rem;
    }

    .upload-preview {
        flex-direction: column;
        text-align: center;
    }

    .preview-image-container {
        width: 100px;
        height: 100px;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .sizes-checkboxes {
        grid-template-columns: 1fr 1fr;
    }

    .favicons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-options {
        flex-direction: column;
    }

    .download-btn {
        width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .sizes-checkboxes {
        grid-template-columns: 1fr;
    }

    .favicons-grid {
        grid-template-columns: 1fr 1fr;
    }

    .size-use {
        display: none;
    }
}

