/* Upload Details Modal Styles */

/* Modal Overlay */
.upload-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.upload-modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Modal Content */
.upload-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.upload-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.upload-modal-title {
    font-family: 'Bungee Inline', cursive;
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.upload-modal-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #9ca3af;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.upload-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Modal Body */
.upload-modal-body {
    display: flex;
    gap: 24px;
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Art Section */
.upload-art-section {
    flex-shrink: 0;
    width: 180px;
}

.upload-art-preview {
    width: 180px;
    height: 180px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
}

.upload-art-preview:hover {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(96, 165, 250, 0.1);
}

.upload-art-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-art-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6b7280;
}

.upload-art-placeholder i {
    font-size: 2rem;
}

.upload-art-placeholder span {
    font-size: 0.75rem;
    text-align: center;
}

/* Form Section */
.upload-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upload-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.upload-field-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.upload-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-field-label .required {
    color: #ef4444;
}

.upload-field-input,
.upload-field-textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 3px 14px;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.upload-field-input:focus,
.upload-field-textarea:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.upload-field-input::placeholder,
.upload-field-textarea::placeholder {
    color: #4b5563;
}

.upload-field-textarea {
    min-height: 80px;
    resize: vertical;
}

/* Tags Container */
.upload-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

/* Collaborators display container - only takes space when populated */
#upload-collaborators-display,
.tag-display-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    min-height: 0;
}

#upload-collaborators-display:empty,
.tag-display-container:empty {
    display: none;
}

.upload-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #93c5fd;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.upload-tag-remove {
    background: none;
    border: none;
    color: #93c5fd;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.upload-tag-remove:hover {
    opacity: 1;
}

/* Modal Footer */
.upload-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.upload-modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-modal-cancel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #d1d5db;
}

.upload-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.upload-modal-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.upload-modal-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.upload-modal-submit:active {
    transform: translateY(0);
}

.upload-modal-submit:disabled {
    background: #374151;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ================================
   INLINE UPLOAD FORM IN COPILOT FEED
   ================================ */

.upload-inline-form {
    margin-top: 12px;
}

.upload-inline-content {
    padding: 12px 0;
}

.upload-inline-prompt {
    color: #d1d5db;
    font-size: 0.875rem;
    margin: 0 0 16px 0;
}

.upload-inline-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.upload-inline-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.upload-inline-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #9ca3af;
}

.upload-inline-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.upload-inline-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.upload-inline-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.upload-inline-submit:disabled {
    background: #374151;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: none;
}

/* Art inline preview */
.upload-art-inline-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upload-art-inline-preview {
    width: 120px;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.upload-art-inline-preview:hover {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(96, 165, 250, 0.05);
}

.upload-art-inline-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-art-inline-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #6b7280;
}

.upload-art-inline-placeholder i {
    font-size: 1.5rem;
}

.upload-art-inline-placeholder span {
    font-size: 0.65rem;
    text-align: center;
}

/* Description wrapper with counter */
.upload-description-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.upload-description-wrapper .upload-field-textarea {
    padding-bottom: 24px;
}

.upload-description-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.upload-description-counter.count-red {
    color: #ef4444;
}

.upload-description-counter.count-green {
    color: #22c55e;
}

.upload-description-counter.count-warning {
    color: #f59e0b;
}

/* AI Generate button for inline form - Scoped to .upload-art-inline-group */
.upload-art-inline-group > .upload-art-ai-btn {
    width: 80px !important;
    height: 80px !important;
    border-radius: 8px;
    border: 2px dashed rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.1);
    color: #a855f7;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 20px;
    gap: 4px;
}

.upload-art-inline-group > .upload-art-ai-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.6);
    color: #c084fc;
}

.upload-art-inline-group > .upload-art-ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-art-inline-group > .upload-art-ai-btn i {
    pointer-events: none;
    font-size: 18px !important;
}

.upload-art-inline-group > .upload-art-ai-btn .ai-btn-text {
    font-size: 10px;
    font-weight: 600;
}

.upload-art-inline-group > .upload-art-ai-btn .ai-btn-coin {
    font-size: 10px;
    gap: 2px;
}

.upload-art-inline-group > .upload-art-ai-btn .ai-btn-coin i {
    font-size: 10px !important;
}

.upload-art-inline-group > .upload-art-ai-btn .coin-count {
    font-size: 10px;
    font-weight: 700;
}

/* ================================
   NEW ART MODAL CONTAINER
   AI section with description box
   ================================ */

.upload-art-modal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* AI Generation Section */
.upload-art-ai-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* AI Prompt Textarea */
.upload-art-ai-prompt-box {
    width: 100%;
}

.upload-art-ai-prompt-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-family: inherit;
    resize: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.upload-art-ai-prompt-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.upload-art-ai-prompt-input::placeholder {
    color: #6b7280;
}

/* AI Generate Button with Coin - acts as footer/banner for textarea - Scoped to .upload-art-modal-container */
.upload-art-modal-container > .upload-art-ai-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2px 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(124, 58, 237, 0.2) 100%);
    border: none;
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    color: #c084fc;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.72rem;
    font-weight: 600;
    width: 100%;
    margin-top: 0;
    border-radius: 0 0 12px 12px;
    min-height: auto;
}

.upload-art-modal-container > .upload-art-ai-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(124, 58, 237, 0.3) 100%);
    color: #e9d5ff;
}

.upload-art-modal-container > .upload-art-ai-btn:active {
    transform: scale(0.99);
}

.upload-art-modal-container > .upload-art-ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-art-modal-container > .upload-art-ai-btn i.fas {
    pointer-events: none;
}

/* AI Button text */
.upload-art-modal-container > .upload-art-ai-btn .ai-btn-text {
    flex: 1;
    text-align: center;
}

/* AI Button coin indicator - no bubble, just inline */
.upload-art-modal-container > .upload-art-ai-btn .ai-btn-coin {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 4px;
}

.upload-art-modal-container > .upload-art-ai-btn .ai-btn-coin i.fas {
    color: #fbbf24;
    font-size: 0.72rem;
}

.upload-art-modal-container > .upload-art-ai-btn .coin-count {
    color: #fbbf24;
    font-size: 0.72rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 600px) {
    .upload-modal-body {
        flex-direction: column;
    }
    
    .upload-art-section {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .upload-art-preview {
        width: 140px;
        height: 140px;
    }
}
