/* --- 1. BUTON YASAKLI DURUMU --- */
#eklebuton.ekle-yasak {
    cursor: not-allowed !important;
    opacity: 0.4;
    position: relative;
    pointer-events: auto;
}
#eklebuton.ekle-yasak:hover::after {
    content: "Buraya klasör ekleyemezsin.";
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22, 22, 24, 0.95);
    color: #ff3333;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid rgba(255, 51, 51, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    font-family: 'Hack Font', monospace;
    z-index: 10000;
}

/* --- 2. MODAL OVERLAY --- */
#katki-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
#katki-modal-overlay.active {
    opacity: 1; pointer-events: auto;
}

/* --- 3. MODAL KUTU --- */
.katki-modal {
    background: rgba(22, 22, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    width: 420px;
    max-width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    font-family: 'Inter', sans-serif;
    color: #e0e0e0;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}
#katki-modal-overlay.active .katki-modal {
    transform: translateY(0);
}

.katki-modal h3 {
    margin: 0 0 20px 0;
    font-family: 'Hack Font', monospace;
    font-size: 17px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

/* --- 4. INPUT GRUPLARI --- */
.katki-input-group { margin-bottom: 15px; }

.katki-input-group label {
    display: block; margin-bottom: 6px; font-size: 12px; color: #aaa;
}

.katki-required {
    color: #ff3333;
    font-size: 11px;
}

.katki-input-group input,
.katki-input-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border 0.3s;
}
.katki-input-group input:focus,
.katki-input-group textarea:focus {
    border-color: rgba(179, 0, 0, 0.6);
}
.katki-input-group textarea {
    resize: vertical;
    min-height: 90px;
    font-size: 14px;
}

/* --- 5. KARAKTER SAYACI --- */
.katki-char-counter {
    text-align: right;
    font-size: 11px;
    color: #555;
    margin-top: 4px;
}

/* --- 6. DOSYA YÜKLEME ALANI --- */
.katki-file-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.katki-file-pick-btn {
    align-self: flex-start;
}

.katki-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --- 7. DOSYA ITEM (YENİ: ÖNİZLEMELİ) --- */
.katki-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: #ccc;
    transition: background 0.2s;
}
.katki-file-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* Önizleme kutusu: görsel veya video ikonu */
.katki-file-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 5px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Görsel thumbnail */
.katki-file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

/* Video ikonu SVG */
.katki-file-thumb .katki-video-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.katki-file-thumb .katki-video-icon svg {
    width: 22px;
    height: 22px;
    opacity: 0.7;
}
.katki-file-thumb .katki-video-ext {
    font-size: 9px;
    font-family: 'Hack Font', monospace;
    color: #ff6b6b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Yüklenirken skeleton */
.katki-file-thumb.loading {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 200% 100%;
    animation: katki-skeleton 1.2s infinite;
}
@keyframes katki-skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Dosya bilgi sütunu */
.katki-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.katki-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #ddd;
    line-height: 1.3;
}

.katki-file-meta {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
}

/* Silme butonu */
.katki-file-remove {
    background: none;
    border: none;
    color: #ff5555;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 5px;
    line-height: 1;
    flex-shrink: 0;
    border-radius: 4px;
    transition: opacity 0.2s, background 0.2s;
}
.katki-file-remove:hover {
    opacity: 0.85;
    background: rgba(255, 85, 85, 0.12);
}

/* --- 8. ALT BUTONLAR --- */
.katki-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.katki-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Hack Font', monospace;
    font-size: 13px;
}
.katki-btn:hover { background: rgba(255, 255, 255, 0.1); }
.katki-btn.submit { border-color: #b30000; color: #ff3333; }
.katki-btn.submit:hover { background: rgba(179, 0, 0, 0.2); }
.katki-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- 9. RESPONSIVE --- */
@media (max-width: 480px) {
    .katki-file-thumb {
        width: 40px;
        height: 40px;
    }
    .katki-file-thumb .katki-video-icon svg {
        width: 18px;
        height: 18px;
    }
    .katki-file-name {
        font-size: 11px;
    }
    .katki-file-meta {
        font-size: 9px;
    }
}