/* Tools Upload Styles */

.tools-upload-wrap
{
    width: 100%;
}

.upload-drop-zone
{
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-drop-zone-compact
{
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 10px 15px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.upload-drop-zone-compact:hover
{
    border-color: #007bff;
    background: #f0f7ff;
    color: #007bff;
}

.upload-drop-zone-compact.upload-drag-over
{
    border-color: #007bff;
    background: #e7f3ff;
    border-style: solid;
    color: #007bff;
}

.upload-drop-zone-compact i
{
    font-size: 20px;
}

.upload-drop-zone-compact span
{
    flex: 1;
}

.upload-action-row
{
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 15px;
    --upload-action-height: 48px;
}

.upload-action-row .upload-drop-zone-compact
{
    flex: 1;
    margin-bottom: 0;
    min-height: var(--upload-action-height);
    height: var(--upload-action-height);
    padding: 0 15px;
    box-sizing: border-box;
}

.upload-action-row .upload-camera-btn,
.upload-action-row .upload-photo-btn
{
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--upload-action-height);
    min-width: var(--upload-action-height);
    height: var(--upload-action-height);
    min-height: var(--upload-action-height);
    padding: 0;
    margin: 0;
    font-size: 20px;
    line-height: 1;
    border: 2px dashed #ccc;
    border-radius: 6px;
    background: #f9f9f9;
    color: #666;
    box-shadow: none;
    transition: all 0.3s ease;
}

.upload-action-row .upload-camera-btn:hover,
.upload-action-row .upload-camera-btn:focus,
.upload-action-row .upload-photo-btn:hover,
.upload-action-row .upload-photo-btn:focus
{
    border-color: #007bff;
    background: #f0f7ff;
    color: #007bff;
}

.upload-camera-overlay
{
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: #000;
    display: flex;
    flex-direction: column;
}

.upload-camera-preview
{
    flex: 1;
    width: 100%;
    object-fit: cover;
    background: #000;
}

.upload-camera-controls
{
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.upload-camera-timer
{
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    min-width: 48px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.upload-camera-record-dot
{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    animation: upload-camera-blink 1s infinite;
}

@keyframes upload-camera-blink
{
    0%, 100%
    {
        opacity: 1;
    }
    50%
    {
        opacity: 0.2;
    }
}

body.tools-upload-camera-open
{
    overflow: hidden;
}

.upload-drop-zone-compact .upload-file-input
{
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

.upload-drop-zone:hover
{
    border-color: #007bff;
    background: #f0f7ff;
}

.upload-drop-zone.upload-drag-over
{
    border-color: #007bff;
    background: #e7f3ff;
    border-style: solid;
}

.upload-drop-zone-content
{
    pointer-events: none;
}

.upload-drop-zone-content .upload-select-btn
{
    pointer-events: auto;
}

.upload-icon
{
    font-size: 48px;
    color: #999;
    margin-bottom: 15px;
    display: block;
}

.upload-text
{
    font-size: 16px;
    color: #666;
    margin: 10px 0;
}

.upload-text-small
{
    font-size: 14px;
    color: #999;
    margin: 5px 0;
}

.upload-select-btn
{
    margin-top: 15px;
    pointer-events: auto;
}

.upload-file-input
{
    display: none;
}

.upload-progress-wrap
{
    margin-top: 20px;
}

.upload-progress-list
{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-progress-item
{
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-progress-item-info
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.upload-progress-item-name
{
    font-weight: 500;
    color: #333;
    flex: 1;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.upload-progress-item-status
{
    font-size: 12px;
    color: #666;
    flex: 1;
}

.upload-progress-cancel-btn
{
    flex-shrink: 0;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1;
}

.upload-progress-item-bar-wrap
{
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.upload-progress-item-bar
{
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.upload-progress-item-success .upload-progress-item-bar
{
    background: #28a745;
}

.upload-progress-item-error .upload-progress-item-bar
{
    background: #dc3545;
}

.upload-progress-item-error .upload-progress-item-status
{
    color: #dc3545;
}

.upload-files-list
{
    margin-top: 20px;
    min-height: 100px;
    position: relative;
}

.upload-files-list.upload-clickable-area
{
    cursor: pointer;
}

.upload-files-list.upload-clickable-area:hover
{
    background: #f8f9fa;
    border-radius: 6px;
}

.upload-clickable
{
    cursor: pointer;
}

.upload-clickable:hover
{
    background: #f8f9fa;
    border-radius: 6px;
}

.upload-empty-state
{
    padding: 40px 20px;
    text-align: center;
    cursor: default;
}

.upload-empty-state.upload-clickable
{
    cursor: pointer;
    border: 2px dashed #ddd;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.upload-empty-state.upload-clickable:hover
{
    border-color: #007bff;
    background: #f0f7ff;
}

.upload-empty-icon
{
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
    display: block;
}

.upload-files-sortable
{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-file-item
{
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
    cursor: move;
}

.upload-file-item:hover
{
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.upload-file-item-icon
{
    font-size: 32px;
    color: #007bff;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.upload-file-thumbnail
{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
}

.upload-file-item-info
{
    flex: 1;
    min-width: 0;
}

.upload-file-item-name
{
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    word-break: break-word;
}

.upload-file-name-editable
{
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 2px 4px;
    border-radius: 3px;
    min-height: 20px;
}

.upload-file-name-editable:hover
{
    background-color: #f0f0f0;
}

.upload-file-name-editable[contenteditable="true"]
{
    background-color: #fff;
    border: 1px solid #007bff;
    border-radius: 4px;
    padding: 2px 6px;
    outline: none;
    cursor: text;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.upload-file-item-meta
{
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.upload-file-item-separator
{
    color: #ccc;
}

.upload-file-item-actions
{
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
}

.upload-file-action-btn
{
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.upload-file-action-btn:hover
{
    background: #f0f0f0;
    color: #333;
}

.upload-file-download-btn
{
    color: #007bff;
}

.upload-file-download-btn:hover
{
    background: #e7f3ff;
    color: #0056b3;
}

.upload-file-pin-btn.is-active
{
    color: #f59e0b;
}

.upload-file-pin-btn.is-active:hover
{
    background: #fef3c7;
    color: #d97706;
}

.upload-file-online-btn.is-active
{
    color: #16a34a;
}

.upload-file-online-btn.is-active:hover
{
    background: #dcfce7;
    color: #15803d;
}

.upload-file-online-btn:not(.is-active)
{
    color: #9ca3af;
}

.upload-file-online-btn:not(.is-active):hover
{
    background: #f3f4f6;
    color: #6b7280;
}

.upload-file-item-off
{
    opacity: 0.55;
}

.upload-file-item-off .upload-file-item-name
{
    text-decoration: line-through;
    text-decoration-color: rgba(107, 114, 128, 0.45);
}

.upload-file-delete-btn
{
    color: #dc3545;
}

.upload-file-delete-btn:hover
{
    background: #ffe7e7;
    color: #c82333;
}

.upload-file-item-placeholder
{
    background: #f0f7ff;
    border: 2px dashed #007bff;
    border-radius: 6px;
    height: 70px;
    margin: 5px 0;
    opacity: 0.5;
}

.upload-file-item.ui-sortable-helper
{
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: rotate(2deg);
    z-index: 1000;
}

/* Görünüm Seçenekleri */
.upload-view-options
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
}

.upload-view-options-right
{
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.upload-secim-bar
{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.upload-secim-adet
{
    font-size: 12px;
    font-weight: 600;
    color: #217db9;
    white-space: nowrap;
}

.upload-file-secim
{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    z-index: 6;
}

.upload-file-secim-input
{
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.upload-file-secim-kutu
{
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.upload-file-secim-kutu i
{
    font-size: 13px;
    line-height: 1;
}

.upload-file-secim-input:checked + .upload-file-secim-kutu
{
    background: #217db9;
    border-color: #217db9;
    color: #fff;
}

.upload-file-secim:focus-within .upload-file-secim-kutu
{
    box-shadow: 0 0 0 2px rgba(33, 125, 185, 0.28);
}

.upload-file-item.is-selected
{
    border-color: #217db9;
    box-shadow: 0 0 0 2px rgba(33, 125, 185, 0.28);
}

.upload-view-btn
{
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.upload-view-btn-n
{
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.upload-view-btn:hover
{
    background: #f5f5f5;
    border-color: #007bff;
    color: #007bff;
}

.upload-view-btn.active
{
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.upload-view-btn i
{
    font-size: 18px;
}

/* Minimal Görünüm - Tek satır, minimum içerik */
.upload-view-minimal .upload-files-sortable
{
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-view-minimal .upload-file-item
{
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    min-height: 40px;
}

.upload-view-minimal .upload-file-item-icon
{
    width: 24px;
    height: 24px;
    font-size: 18px;
    flex-shrink: 0;
    margin-right: 10px;
}

.upload-view-minimal .upload-file-item-icon img
{
    display: none;
}

.upload-view-minimal .upload-file-item-info
{
    flex: 1;
    min-width: 0;
    margin-right: 10px;
}

.upload-view-minimal .upload-file-item-name
{
    font-size: 13px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-view-minimal .upload-file-item-meta
{
    display: none;
}

.upload-view-minimal .upload-file-item-actions
{
    flex-shrink: 0;
    gap: 5px;
}

.upload-view-minimal .upload-file-action-btn
{
    padding: 4px 6px;
    font-size: 16px;
}

/* Detaysız Görünüm */
.upload-view-compact .upload-files-sortable
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.upload-view-grid3 .upload-files-sortable
{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.upload-view-grid4 .upload-files-sortable
{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.upload-view-compact .upload-file-item
{
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 4px;
    cursor: grab;
    overflow: visible;
}

.upload-view-compact .upload-file-item:active
{
    cursor: grabbing;
}

.upload-view-compact .upload-file-item-icon
{
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.upload-view-compact .upload-file-item-info
{
    width: 100%;
    margin-bottom: 10px;
}

.upload-view-compact .upload-file-item-name
{
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 0;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
}

.upload-view-compact .upload-file-item-meta
{
    display: none;
}

.upload-view-compact .upload-file-item-actions
{
    width: 100%;
    justify-content: center;
    gap: 0;
    margin-top: 4px;
    flex-wrap: nowrap;
}

.upload-view-compact .upload-file-item-actions .upload-file-action-btn
{
    padding: 4px 6px;
    font-size: 14px;
    flex-shrink: 0;
    min-width: 0;
}

/* Detaylı Görünüm (Mevcut) */
.upload-view-detailed .upload-files-sortable
{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-view-detailed .upload-file-item
{
    flex-direction: row;
    align-items: center;
    text-align: left;
}

/* File Preview Styles */
.upload-file-preview-wrap
{
    width: 100%;
}

.upload-file-preview-content
{
    width: 100%;
}

.upload-file-preview-info-section
{
    margin-top: 0;
}

.upload-file-preview-navigation
{
    margin-top: 0;
}

.upload-file-nav-btn
{
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
    border: 1px solid #e0e0e0;
    background: #fff;
}

.upload-file-nav-btn:hover
{
    background: #f5f5f5;
    border-color: #007bff;
    text-decoration: none;
    color: inherit;
}

.upload-file-nav-prev
{
    flex-direction: row;
}

.upload-file-nav-next
{
    flex-direction: row-reverse;
}

.upload-file-preview-item
{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-file-preview-thumbnail
{
    width: 100%;
    max-width: 150px;
    margin-bottom: 8px;
}

.upload-file-preview-info
{
    text-align: center;
    width: 100%;
}

.upload-file-preview-icon
{
    cursor: pointer;
    transition: transform 0.2s;
}

.upload-file-preview-icon:hover
{
    transform: scale(1.05);
}

.upload-file-aciklama-input
{
    resize: vertical;
    min-height: 80px;
}

/* Responsive */
@media (max-width: 768px)
{
    .upload-file-item
    {
        flex-wrap: wrap;
    }
    
    .upload-file-item-actions
    {
        width: 100%;
        justify-content: flex-end;
    }
    
    .upload-view-options
    {
        justify-content: space-between;
    }
    
    .upload-view-minimal .upload-file-item
    {
        padding: 6px 10px;
        min-height: 36px;
    }
    
    .upload-view-minimal .upload-file-item-icon
    {
        width: 20px;
        height: 20px;
        font-size: 16px;
        margin-right: 8px;
    }
    
    .upload-view-minimal .upload-file-item-name
    {
        font-size: 12px;
    }
    
    .upload-view-compact .upload-files-sortable
    {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .upload-view-compact .upload-file-item-icon
    {
        width: 60px;
        height: 60px;
    }

    .upload-view-compact .upload-file-item-actions .upload-file-action-btn
    {
        padding: 3px 5px;
        font-size: 13px;
    }
    
    .upload-file-nav-btn
    {
        flex-direction: column !important;
        text-align: center;
    }
    
    .upload-file-nav-next
    {
        flex-direction: column !important;
    }
    
    .upload-file-preview-thumbnail
    {
        max-width: 100px;
    }
}

.upload-file-etiket
{
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    min-height: 0;
    position: relative;
    z-index: 2;
    pointer-events: auto;
    cursor: text;
}

.upload-file-etiket:focus
{
    border-color: #217db9;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 125, 185, 0.12);
}

.upload-file-item-chosen
{
    opacity: 0.7;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
