/* SVG Color Editor Specific Styles */

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #40444b;
    border-radius: 8px;
    border: 1px solid #202225;
}

.upload-section h3 {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #5865f2;
    padding-bottom: 8px;
}

.upload-area {
    border: 2px dashed #4f545c;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #2f3136;
}

.upload-area:hover {
    border-color: #5865f2;
    background: #36393f;
}

.upload-area.dragover {
    border-color: #57f287;
    background: #3a4a3d;
    border-style: solid;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-content svg {
    color: #5865f2;
    margin-bottom: 8px;
}

.upload-content p {
    margin: 0;
    color: #dcddde;
    font-size: 0.95rem;
}

.upload-hint {
    color: #72767d !important;
    font-size: 0.85rem !important;
    font-style: italic;
}

.file-name {
    margin-top: 15px;
    padding: 10px 15px;
    background: #2f3136;
    border-radius: 6px;
    border: 1px solid #202225;
    color: #dcddde;
    font-size: 0.9rem;
    display: none;
}

/* Color Editor Section */
.color-editor-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #40444b;
    border-radius: 8px;
    border: 1px solid #202225;
}

.color-editor-section h3 {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #5865f2;
    padding-bottom: 8px;
}

.color-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.no-colors-message {
    text-align: center;
    color: #72767d;
    padding: 30px;
    font-size: 0.9rem;
    font-style: italic;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #2f3136;
    border-radius: 6px;
    border: 1px solid #202225;
    transition: all 0.2s ease;
}

.color-item:hover {
    background: #36393f;
    border-color: #5865f2;
}

.color-preview-box {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    border: 2px solid #202225;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-preview-box:hover {
    transform: scale(1.05);
}

.color-info {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    min-width: 0;
}

.color-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.color-section:first-child {
    flex: 0 0 auto;
    max-width: 45%;
}

.new-color-section {
    flex: 1;
    margin-left: 15px;
}

.color-value-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-label {
    font-size: 0.75rem;
    color: #72767d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-value {
    font-size: 0.85rem;
    color: #b9bbbe;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    word-break: break-all;
}

.color-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.color-picker {
    width: 38px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
}

.color-text-input {
    flex: 1;
    padding: 8px 12px;
    background: #2f3136;
    border: 1px solid #202225;
    border-radius: 4px;
    color: #dcddde;
    font-size: 0.85rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    min-width: 0;
    max-width: 100%;
}

.color-text-input:focus {
    outline: none;
    border-color: #5865f2;
    box-shadow: 0 0 0 1px #5865f2;
}

.color-text-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #2a2d31;
}

.delete-color-btn {
    width: 32px;
    height: 32px;
    background: #ed4245;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.delete-color-btn:hover {
    background: #c03537;
    transform: scale(1.1);
}

.color-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* Preview Section */
.svg-preview-container {
    margin-bottom: 30px;
}

.svg-preview {
    min-height: 300px;
    padding: 20px;
    background: #2f3136;
    border-radius: 8px;
    border: 1px solid #202225;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.empty-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #72767d;
    text-align: center;
}

.empty-preview svg {
    color: #4f545c;
}

.empty-preview p {
    margin: 0;
    font-size: 0.9rem;
}

.svg-display {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.svg-display svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Download Button in Header */
#downloadBtn.main-button:disabled {
    background: #40444b;
    color: #72767d;
    cursor: not-allowed;
    opacity: 0.6;
}

#downloadBtn.main-button:disabled:hover {
    background: #40444b;
    transform: none;
}

/* Custom Scrollbar */
.color-list::-webkit-scrollbar {
    width: 8px;
}

.color-list::-webkit-scrollbar-track {
    background: #2f3136;
    border-radius: 4px;
}

.color-list::-webkit-scrollbar-thumb {
    background: #4f545c;
    border-radius: 4px;
    border: 1px solid #2f3136;
}

.color-list::-webkit-scrollbar-thumb:hover {
    background: #5d6269;
}

/* Responsive Design */
@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
    }

    .color-item {
        flex-direction: column;
        align-items: stretch;
    }

    .color-info {
        flex-direction: column;
        gap: 15px;
    }

    .new-color-section {
        margin-left: 0;
    }

    .color-preview-box {
        width: 100%;
        height: 80px;
    }

    .color-input-wrapper {
        flex-wrap: wrap;
    }

    .color-actions .btn {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 30px 15px;
    }

    .color-editor-section,
    .upload-section {
        padding: 15px;
    }

    .svg-preview {
        min-height: 200px;
        padding: 15px;
    }
}

