/* ==============================
   Favicon Generator
   ============================== */

.fav-source-section {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 15px;
}

.fav-source-section .preview-header {
    margin-bottom: 12px;
}

.fav-source-preview {
    width: 100%;
    aspect-ratio: 1;
    background: repeating-conic-gradient(#333 0% 25%, #222 0% 50%) 50% / 20px 20px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Preset Options */
.fav-preset-options {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    padding: 3px;
}

.fav-preset-btn {
    flex: 1;
    padding: 8px 6px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    transition: all 0.25s;
    background: transparent;
    color: #666;
    white-space: nowrap;
    font-family: inherit;
}

.fav-preset-btn:hover {
    color: #aaa;
}

.fav-preset-btn.active {
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0, 212, 255, 0.3);
}

.fav-preset-desc {
    font-size: 0.7rem;
    color: #888;
    line-height: 1.4;
    padding: 4px 2px;
}

/* Shape Options */
.fav-shape-options {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.fav-shape-btn {
    flex: 1;
    padding: 8px 4px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    background: none;
    color: #888;
    text-align: center;
    font-family: inherit;
}

.fav-shape-btn:hover {
    border-color: #666;
    color: #ccc;
}

.fav-shape-btn.active {
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(0, 212, 255, 0.08);
    color: #00d4ff;
}

/* Color Picker Row */
.fav-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fav-color-row span {
    font-size: 0.85rem;
    color: #aaa;
    min-width: 50px;
}

.fav-color-row input[type="color"] {
    width: 36px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.fav-color-row input[type="text"] {
    width: 80px;
    padding: 6px 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-family: monospace;
}

.fav-color-row input[type="text"]:focus {
    border-color: #00d4ff;
    outline: none;
}

.fav-transparent-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.fav-transparent-toggle input[type="checkbox"] {
    display: none;
}

.fav-transparent-toggle span {
    color: #aaa;
    font-size: 0.85rem;
    min-width: 0;
}

/* Icon Grid */
.fav-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.fav-icon-item {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
}

.fav-icon-item-preview {
    width: 64px;
    height: 64px;
    background: repeating-conic-gradient(#333 0% 25%, #222 0% 50%) 50% / 10px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fav-icon-item-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.fav-icon-item-label {
    font-size: 0.7rem;
    color: #aaa;
    text-align: center;
}

.fav-icon-item-size {
    font-size: 0.65rem;
    color: #666;
}

.fav-icon-item .download-btn {
    margin-left: 0;
    font-size: 0.7rem;
    padding: 4px 10px;
    width: 100%;
    text-align: center;
    display: block;
}

/* Snippet Section */
.fav-snippet-section {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 15px;
}

.fav-snippet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fav-snippet-title {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fav-snippet-copy {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #aaa;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.fav-snippet-copy:hover {
    color: #fff;
    background: rgba(255,255,255,0.2);
}

.fav-snippet-code {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.7rem;
    color: #aaa;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    max-height: 300px;
    overflow-y: auto;
}

/* Generate Button */
.fav-generate-btn {
    width: 100%;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    border: none;
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: bold;
    transition: transform 0.2s, opacity 0.2s;
    margin-bottom: 15px;
    display: none;
}

.fav-generate-btn.visible {
    display: block;
}

.fav-generate-btn:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Toast (reuse from placeholder if available) */
.fav-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,0.9);
    color: #4ade80;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 0.85rem;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1001;
}

.fav-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
