/* ============================================
 * FOLDER STYLES
 * ============================================ */

/* ============================================
 * NEW FOLDER BUTTON
 * ============================================ */
.new-folder-btn {
    margin: 0;
    width: 25px;
    height: 25px;
    padding: 0;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    color: #333333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.new-folder-btn .folder-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}

.new-folder-btn .folder-icon-container img,
.new-folder-btn .folder-icon {
    width: 13px;
    height: 13px;
    opacity: 0.7;
}

.new-folder-btn .folder-text {
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
    margin-left: 8px;
    font-size: 13px;
}

.new-folder-btn:hover { 
    background: #666666; 
    color: #ffffff;
    width: 110px;
    border-radius: 14px;
}

.new-folder-btn:hover .folder-icon-container img,
.new-folder-btn:hover .folder-icon {
    filter: invert(1);
    opacity: 1;
}

.new-folder-btn:hover .folder-text {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
 * BUTTON CONTAINER
 * ============================================ */
.project-buttons-container {
    display: flex;
    gap: 10px;
    padding: 2px 20px 8px 35px;
    align-items: center;
}

.project-buttons-container .new-project-btn {
    margin: 0 !important;
    display: flex !important;
}

/* Folders List Container */
#projectFoldersList {
    margin-bottom: 4px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Individual Folder */
.project-folder {
    margin: 2px 12px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.15s ease;
}

.project-folder.drag-over {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Folder Header */
.folder-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    border-radius: 10px;
    transition: background 0.15s ease;
    min-height: 40px;
}

.folder-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.folder-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
    min-width: 18px;
}

.folder-arrow {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease;
    width: 8px;
}

.project-folder.expanded .folder-arrow {
    transform: rotate(90deg);
}

.folder-name-icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    opacity: 0.5;
    flex-shrink: 0;
    filter: invert(1);
}

.folder-header:hover .folder-name-icon {
    opacity: 0.7;
}

.folder-name {
    flex: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Folder Actions */
.folder-actions {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.folder-header:hover .folder-actions {
    opacity: 1;
}

.folder-action-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.folder-action-btn.rename {
    font-size: 12px;
}

.folder-action-btn.rename:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

.folder-action-btn.delete:hover {
    color: rgba(255, 100, 100, 0.9);
    background: rgba(255, 100, 100, 0.1);
}

/* Folder rename input */
.folder-rename-input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    outline: none;
    min-width: 0;
    margin-right: 8px;
}

.folder-rename-input:focus {
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(0, 0, 0, 0.6) !important;
}

/* Folder Content */
.folder-content {
    padding-left: 8px;
    margin-top: 0;
}

/* Projects inside folders - compact */
.folder-content .sidebar-item.project-item {
    margin: 1px 4px 1px 8px;
    min-height: 38px;
}

.folder-content .sidebar-item-icon.project-thumb {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    font-size: 9px;
    margin-right: 10px;
}

/* ============================================
 * DRAG & DROP VISUALS
 * ============================================ */
.project-drag-capsule {
    position: absolute;
    top: -1000px;
    background: rgba(30, 30, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.project-drag-capsule .project-thumb {
    width: 16px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.project-item.dragging {
    opacity: 0.4;
}

body.project-dragging .project-folder {
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

/* Drop zone visual feedback */
.project-bucket-body.drag-over {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    position: relative;
}

.project-bucket-body.drag-over::before {
    content: 'Drop here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
}

/* ============================================
 * FOLDER NAME INPUT PILL
 * ============================================ */
.folder-name-pill {
    margin: 4px 20px 8px 35px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    animation: folderPillSlideIn 0.2s ease-out;
}

@keyframes folderPillSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.folder-pill-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.folder-pill-icon img {
    width: 100%;
    height: 100%;
    filter: invert(1);
    opacity: 0.7;
}

.folder-name-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    outline: none;
    padding: 0;
    min-width: 0;
}

.folder-name-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.folder-pill-cancel {
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.folder-pill-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* ============================================
 * FOLDER DELETE CONFIRMATION
 * ============================================ */
.folder-delete-confirmation-pill {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.folder-delete-confirmation-pill.active {
    opacity: 1;
    pointer-events: all;
}

.folder-confirm-pill-container {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 16px 28px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    gap: 16px;
    animation: folderPillSlideUpScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes folderPillSlideUpScale {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.folder-confirm-pill-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.folder-confirm-pill-icon img {
    width: 100%;
    height: 100%;
    filter: invert(1);
    opacity: 0.8;
}

.folder-confirm-pill-text {
    flex: 1;
    min-width: 0;
}

.folder-confirm-pill-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.6px;
    margin-bottom: 2px;
}

.folder-confirm-pill-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
}

.folder-confirm-pill-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.folder-confirm-pill-btn {
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid;
    outline: none;
    white-space: nowrap;
}

.folder-confirm-no {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.folder-confirm-no:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
}

.folder-confirm-yes {
    background: rgba(255, 80, 80, 0.2);
    color: rgba(255, 130, 130, 1);
    border-color: rgba(255, 100, 100, 0.4);
}

.folder-confirm-yes:hover {
    background: rgba(255, 90, 90, 0.3);
    border-color: rgba(255, 120, 120, 0.6);
}

.folder-confirm-pill-btn:active {
    transform: scale(0.97);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .folder-confirm-pill-container {
        padding: 14px 20px;
        gap: 12px;
    }
}
