
/* Main container that holds the folder tree */
.container {
    max-width: 350px; /* Maximum width */
    min-width: 300px; /* Minimum width */
    background: white; /* White background for contrast against gradient */
    border-radius: 6px; /* Rounded corners with 12px radius */
    padding: 10px; /* Inner spacing of 30px on all sides */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); /* Shadow effect: 20px down, 60px blur, 30% black */
    flex-shrink: 0; /* Don't allow shrinking */
}


/* Container for the entire folder tree structure */
.folder-tree {
    padding: 10px 10px 10px 10px; /* Balanced padding */
    margin-left: -10px; /* Move tree more to the left */
}

/* Individual folder item wrapper */
.folder-item {
    margin: 8px 0; /* Vertical spacing: 8px top and bottom, 0 left and right */
    padding-left: 0; /* No left padding (indentation handled by subfolder-container) */
}

/* The main content area of each folder (contains icon, name, button) */
.folder-content {
    display: flex; /* Use flexbox for horizontal layout */
    align-items: center; /* Vertically center all items in the row */
    gap: 10px; /* 10px space between each child element */
    padding: 5px; /* Inner spacing of 10px on all sides */
    background: #f8f9fa; /* Light gray background color */
    border-radius: 6px; /* Rounded corners with 6px radius */
    transition: all 0.2s ease; /* Smooth transition for all property changes over 0.2 seconds */
}

/* Hover effect for folder content */
.folder-content:hover {
    background: #e9ecef; /* Slightly darker gray when hovering */
}

/* The expand/collapse arrow icon */
.folder-icon {
    font-size: 15px; /* Size of the arrow icon */
    cursor: pointer; /* Show pointer cursor on hover to indicate clickable */
    user-select: none; /* Prevent text selection when clicking */
}

/* The folder name text */
.folder-name {
    flex: 1; /* Take up all remaining space in the flex container */
    font-weight: 100; /* Medium font weight (slightly bold) */
    color: #495057; /* Dark gray color for text */
}

/* The "Add" button styling */
.add-btn {
    background: #f0b05d; /* Purple background matching the gradient */
    color: white; /* White text color */
    border: none; /* Remove default button border */
    padding: 6px 6px; /* Vertical 6px, horizontal 14px padding */
    border-radius: 2px; /* Rounded corners with 4px radius */
    cursor: pointer; /* Show pointer cursor on hover */
    font-size: 10px; /* Small font size for compact button */
    font-weight: 600; /* Semi-bold font weight */
    transition: all 0.2s ease; /* Smooth transition for all property changes */
}

/* Hover effect for the Add button */
.add-btn:hover {
    background: #5568d3; /* Darker purple on hover */
    transform: translateY(-1px); /* Move button up by 1px for lift effect */
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4); /* Add shadow: 2px down, 8px blur, purple tint */
}

/* Active/pressed state for the Add button */
.add-btn:active {
    transform: translateY(0); /* Reset position when button is clicked */
}

/* The "Delete" button styling */
.delete-btn {
    background: #dc3545; /* Red background for delete action */
    color: white; /* White text color */
    border: none; /* Remove default button border */
    padding: 6px 6px; /* Vertical 6px, horizontal 6px padding (same as add button) */
    border-radius: 2px; /* Rounded corners with 2px radius (same as add button) */
    cursor: pointer; /* Show pointer cursor on hover */
    font-size: 10px; /* Small font size for compact button (same as add button) */
    font-weight: 600; /* Semi-bold font weight */
    transition: all 0.2s ease; /* Smooth transition for all property changes */
    margin-left: 5px; /* Space between Add and Delete buttons */
}

/* Hover effect for the Delete button */
.delete-btn:hover {
    background: #c82333; /* Darker red on hover */
    transform: translateY(-1px); /* Move button up by 1px for lift effect */
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4); /* Add shadow: 2px down, 8px blur, red tint */
}

/* Active/pressed state for the Delete button */
.delete-btn:active {
    transform: translateY(0); /* Reset position when button is clicked */
}

/* Container for all subfolders within a parent folder */
.subfolder-container {
    margin-left: 10px; /* Indent subfolders by 30px to show hierarchy */
    margin-top: 5px; /* Small space above the subfolder container */
    border-left: 2px solid #dee2e6; /* Vertical line on left to show nesting */
    padding-left: 10px; /* Space between border line and subfolder content */
}

/* Class to hide collapsed folders */
.collapsed {
    display: none; /* Hide the element completely */
}

/* The rotating arrow icon for expand/collapse */
.rotate {
    display: inline-block; /* Allow transform property to work */
    transition: transform 0.2s ease; /* Smooth rotation animation over 0.2 seconds */
}

/* Rotate arrow 90 degrees when folder is open */
.rotate.open {
    transform: rotate(90deg); /* Rotate arrow from ▶ to ▼ */
}

/* Level 2 folders (e.g., Subfolder 1-1) styling */
.level-2 .folder-content {
    background: #e3f2fd; /* Light blue background to distinguish from level 1 */
}

/* Level 2 folders hover effect */
.level-2 .folder-content:hover {
    background: #bbdefb; /* Darker blue on hover */
}

/* Level 3 folders (e.g., Subfolder 1-1-1) - deepest level */
.level-3 .folder-content {
    background: #fff3e0; /* Light orange background to distinguish from level 2 */
}

/* Level 3 folders hover effect */
.level-3 .folder-content:hover {
    background: #ffe0b2; /* Darker orange on hover */
}

/* Level 4 folders (e.g., Subfolder 1-1-1-1) - deepest level */
.level-4 .folder-content {
    background: #f3e5f5; /* Light purple background to distinguish from level 3 */
}

/* Level 4 folders hover effect */
.level-4 .folder-content:hover {
    background: #e1bee7; /* Darker purple on hover */
}

/* Popup overlay - dark background */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Popup container */
.popup-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    min-width: 350px;
    text-align: center;
}

/* Popup title */
.popup-container h3 {
    margin-bottom: 25px;
    color: #333;
    font-size: 20px;
}

/* Popup buttons container */
.popup-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

/* Popup button styling */
.popup-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Asset button - blue */
.asset-btn {
    background: #007bff;
    color: white;
}

.asset-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Folder button - orange */
.folder-btn {
    background: #f0b05d;
    color: white;
}

.folder-btn:hover {
    background: #e09a3d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 176, 93, 0.3);
}

/* Cancel button */
.popup-close {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #5a6268;
}

/* Add delete folder function*/

/* Delete confirmation popup */
.delete-popup {
    max-width: 400px;
}

.delete-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.delete-popup h3 {
    color: #dc3545;
    margin-bottom: 15px;
}

.delete-popup p {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.warning-text {
    color: #dc3545;
    font-weight: 600;
    font-size: 13px;
}

/* Cancel button */
.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Confirm delete button */
.confirm-delete-btn {
    background: #dc3545;
    color: white;
}

.confirm-delete-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Success popup */
.success-popup {
    max-width: 350px;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.success-popup p {
    color: #28a745;
    font-weight: 600;
    margin-bottom: 20px;
}

.success-btn {
    background: #28a745;
    color: white;
    padding: 10px 30px;
}

.success-btn:hover {
    background: #218838;
}

/* Error popup */
.error-popup {
    max-width: 350px;
}

.error-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.error-popup p {
    color: #dc3545;
    font-weight: 600;
    margin-bottom: 20px;
}

.error-btn {
    background: #dc3545;
    color: white;
    padding: 10px 30px;
}

.error-btn:hover {
    background: #c82333;
}

/*---------------------------*/


/*--------- Asset form ---------*/
/* Content wrapper to hold folder tree and form side by side */
.content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px; /* Increased to give more room */
    margin: 0 auto;
    padding: 0 20px; /* Add side padding */
}

/* Asset form container */
.asset-form-container {
    flex: 1;
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    min-width: 500px; /* Ensure minimum width */
}

.asset-form h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Folder path display */
.folder-path {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #f0b05d;
}

.folder-path label {
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 5px;
}

.folder-path span {
    color: #007bff;
    font-weight: 500;
}

/* Form groups */
/* Form row for two columns */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 15px; /* Space between columns */
    margin-bottom: 15px;
}

/* Form groups */
.form-group {
    margin-bottom: 15px;
}

/* Full width form group (for description and single fields) */
.form-group.full-width {
    grid-column: 1 / -1; /* Span across both columns */
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    box-sizing: border-box; /* ADD THIS LINE - ensures padding is included in width */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* Form buttons */
.form-buttons {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel,
.btn-save {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-save {
    background: #28a745;
    color: white;
}

.btn-save:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/*********************************/

/* ========================================
   ICON-ONLY ACTION BUTTONS (NO COLORED BACKGROUNDS)
   ======================================== */

/* Icon-only button - transparent background */
.btn-icon-action {
    background: transparent;      /* No background color */
    border: none;                 /* No border */
    padding: 4px;                 /* Minimal padding */
    margin: 0 4px;                /* Space between buttons */
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hover effect - slight scale and opacity change */
.btn-icon-action:hover {
    transform: scale(1.15);       /* Enlarge on hover */
    opacity: 0.8;                 /* Slight transparency */
}

/* Active/click effect */
.btn-icon-action:active {
    transform: scale(0.95);       /* Slightly smaller on click */
}

/* SVG icon styling */
.action-icon {
    width: 24px;                  /* Icon size */
    height: 24px;                 /* Icon size */
    display: block;               /* Remove inline spacing */
    pointer-events: none;         /* Clicks pass through to button */
}

/* Remove any filters - use original SVG colors */
.btn-icon-action .action-icon {
    filter: none;                 /* Keep original icon colors */
}