/* Image Link Generator - Styles */

.ilg-wrapper {
    max-width: 720px;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Upload Zone */
.ilg-upload-zone {
    border: 2px dashed #c3c4c7;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ilg-upload-zone.dragover {
    border-color: #2271b1;
    background: #e8f0fe;
    transform: scale(1.01);
}

.ilg-upload-icon {
    color: #8c8f94;
    margin-bottom: 12px;
}

.ilg-upload-text {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 4px;
}

.ilg-upload-subtext {
    font-size: 13px;
    color: #8c8f94;
    margin: 0 0 12px;
}

.ilg-upload-info {
    font-size: 12px;
    color: #a7aaad;
    margin: 12px 0 0;
}

/* Buttons */
.ilg-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
}

.ilg-btn-primary {
    background: #2271b1;
    color: #fff;
}

.ilg-btn-primary:hover {
    background: #135e96;
    color: #fff;
}

.ilg-btn-secondary {
    background: #f0f0f1;
    color: #1d2327;
    border: 1px solid #c3c4c7;
}

.ilg-btn-secondary:hover {
    background: #e0e0e1;
}

.ilg-btn-small {
    padding: 4px 10px;
    font-size: 12px;
}

.ilg-btn-copy {
    background: #00a32a;
    color: #fff;
}

.ilg-btn-copy:hover {
    background: #008a20;
}

.ilg-btn-copy.copied {
    background: #1d2327;
}

/* Options */
.ilg-options {
    margin: 16px 0;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e0e0e1;
    border-radius: 8px;
}

.ilg-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1d2327;
    cursor: pointer;
}

.ilg-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2271b1;
}

/* Progress */
.ilg-progress {
    margin: 16px 0;
}

.ilg-progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e1;
    border-radius: 3px;
    overflow: hidden;
}

.ilg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #72aee6);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.ilg-progress-text {
    font-size: 13px;
    color: #646970;
    margin: 6px 0 0;
}

/* Results */
.ilg-results {
    margin: 16px 0;
}

.ilg-result-card {
    background: #fff;
    border: 1px solid #e0e0e1;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    animation: ilg-fadeIn 0.3s ease;
}

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

.ilg-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ilg-result-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e0e0e1;
}

.ilg-result-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
    color: #1d2327;
    word-break: break-all;
}

.ilg-result-meta {
    font-size: 12px;
    color: #8c8f94;
}

.ilg-result-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ilg-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ilg-link-label {
    font-size: 12px;
    font-weight: 600;
    color: #646970;
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ilg-link-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    background: #f6f7f7;
    color: #1d2327;
    cursor: text;
}

.ilg-link-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Gallery */
.ilg-gallery-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e1;
}

.ilg-gallery-section h3 {
    font-size: 16px;
    margin: 0 0 16px;
}

.ilg-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.ilg-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e1;
    cursor: pointer;
    transition: all 0.15s ease;
    aspect-ratio: 1;
}

.ilg-gallery-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ilg-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ilg-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.ilg-gallery-item:hover .ilg-gallery-overlay {
    opacity: 1;
}

/* Toast */
.ilg-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1d2327;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 99999;
    animation: ilg-toastIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@keyframes ilg-toastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
    .ilg-link-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ilg-link-label {
        min-width: unset;
    }

    .ilg-result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ilg-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
