#comfyPage .image-upload-widget {
    height: auto;
    min-height: 48px;
    margin-bottom: 5px;
    background: #27292b;
    border: 1px solid #414344;
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 5px var(--theme-glow);
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
    box-sizing: border-box;
}
#comfyPage .image-upload-widget:hover {
    border-color: var(--theme-accent, var(--theme-primary));
    box-shadow: 0 0 8px var(--theme-glow);
}
#comfyPage .image-upload-title-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    border-bottom: 1px solid #3c3f41;
}
#comfyPage .centered-label {
    text-align: center;
    color: #bebebf;
    font-size: 13px;
    font-weight: 500;
}
#comfyPage .image-upload-content {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}
#comfyPage .image-upload-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 115px;
}
#comfyPage .image-upload-widget .preview-container {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    margin: 5px 10px;
}
#comfyPage .image-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#comfyPage .image-preview.visible {
    opacity: 1;
}
#comfyPage .image-drop-zone {
    width: 100%;
    height : 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--spectrum-global-color-gray-700);
    border-radius: 4px;
    overflow: hidden;
    background: #2d3032;
    transition: all 0.2s ease;
}
#comfyPage .clickable-drop-zone {
    cursor: pointer;
}
#comfyPage .clickable-drop-zone:hover {
    border-color: #c5ef52;
    background: rgba(197, 239, 82, 0.1);
    box-shadow: 0 0 5px rgba(197, 239, 82, 0.2);
}
#comfyPage .clickable-drop-zone .drop-text {
    color: var(--spectrum-global-color-gray-500);
}
#comfyPage .clickable-drop-zone:hover #comfyPage .drop-text {
    color: #c5ef52;
}
#comfyPage .drop-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--spectrum-global-color-gray-500);
    font-size: 12px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 0 5px;
}
.drop-text.hidden {
    opacity: 0;
}
#comfyPage .upload-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}
#comfyPage .upload-button {
    width: 100%;
    padding : 2px 4px;
    background: #2d3032;
    border : 1px solid #525353;
    border-radius: 12px;
    color: #999999;
    font-size : 10px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height : 24px;
    white-space : nowrap;
    overflow : hidden;
    text-overflow : ellipsis;
    margin: 4px;
}
#comfyPage .upload-button:hover {
    background: #c5ef52;
    border-color: #c5ef52;
    color:#3d4246;
}
#comfyPage .upload-button:active {
    background: var(--spectrum-global-color-gray-800);
    transform: translateY(1px);
}
#comfyPage .loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    gap: 5px;
}
#comfyPage .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--spectrum-global-color-blue-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.image-drop-zone.drag-over {
    border-color: var(--spectrum-global-color-blue-500);
    background: rgba(38, 128, 235, 0.1);
    box-shadow: 0 0 5px rgba(38, 128, 235, 0.3);
}
#comfyPage .image-upload-widget .centered-label,
#comfyPage .image-upload-widget .widget-label {
    margin-bottom: 1px !important;
    padding: 1px 0 !important;
    line-height: 1 !important;
}
#comfyPage .file-select-button {
    background: #2d3032;
    border-color: #525353;
    color: #999999;
}
#comfyPage .file-select-button:hover {
    background: var(--spectrum-global-color-gray-500);
    border-color: var(--spectrum-global-color-blue-500);
}
#comfyPage .upload-status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    text-align: center;
    transition: opacity 0.3s ease;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}
.upload-status.visible {
    opacity: 1;
}
.upload-status.status-preparing {
    background: rgba(38, 128, 235, 0.7);
}
.upload-status.status-uploading {
    background: rgba(255, 165, 0, 0.7);
}
.upload-status.status-success {
    background: rgba(76, 175, 80, 0.7);
}
.upload-status.status-error {
    background: rgba(244, 67, 54, 0.7);
}
#comfyPage .loading-indicator {
    justify-content: center;
}
#comfyPage .loading-indicator .spinner {
    margin-bottom: 5px;
} 