/**
 * Folder Management Styles for PRO Users
 * Modern, clean design for folder sidebar and folder records view
 */

/* Folder Panel Container */
.folder-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 16px;
    margin-bottom: 24px;
}

/* Folder Header */
.folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.folder-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Folder List */
.folder-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.folder-item:hover {
    background: #f9fafb;
}

.folder-item.active {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    padding-left: 9px;
}

.folder-item-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.folder-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.folder-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-count {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
    flex-shrink: 0;
}

.folder-item.active .folder-count {
    background: #dbeafe;
    color: #3b82f6;
}

/* Folder Item Actions */
.folder-item-actions {
    display: none;
    gap: 4px;
    margin-left: 8px;
}

.folder-item:hover .folder-item-actions {
    display: flex;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #6b7280;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #111827;
}

.btn-icon.btn-edit:hover {
    background: #dbeafe;
    color: #3b82f6;
}

.btn-icon.btn-delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Folder Records Container */
.folder-records-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.records-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.records-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

/* Records List */
.records-list {
    display: grid;
    gap: 16px;
}

.record-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.record-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

/* Record Thumbnail */
.record-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

/* Record Info */
.record-info {
    flex: 1;
    min-width: 0;
}

.record-date {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.record-data {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.data-item {
    font-size: 14px;
    color: #374151;
}

.data-item strong {
    font-weight: 600;
    color: #111827;
}

.data-item span {
    color: #6b7280;
    margin-left: 8px;
}

/* Record Actions */
.record-actions {
    display: flex;
    align-items: flex-start;
}

.record-actions .btn-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    color: #9ca3af;
}

.record-actions .btn-icon:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Upload Folder Select - Full Width Bar */
.folder-select-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-bottom: none;
}

.folder-select-bar:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

@media (min-width: 768px) {
    .folder-select-bar {
        gap: 0.625rem;
        padding: 0.5rem 1rem;
        border-radius: 10px 10px 0 0;
    }
}

.folder-select-bar__icon {
    color: var(--color-primary, #6366f1);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .folder-select-bar__icon {
        width: 20px;
        height: 20px;
    }
}

.folder-select-bar__select {
    flex: 0 1 auto;
    min-width: 100px;
    max-width: 150px;
    padding: 0.375rem 1.75rem 0.375rem 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.folder-select-bar__select:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.folder-select-bar__select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

@media (min-width: 768px) {
    .folder-select-bar__select {
        min-width: 140px;
        max-width: 180px;
        padding: 0.5rem 2rem 0.5rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 8px;
    }
}

.folder-select-bar__badge {
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: white;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .folder-select-bar__badge {
        font-size: 0.5625rem;
        padding: 0.1875rem 0.5rem;
        border-radius: 4px;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* Button Styles */
.btn-secondary {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .folder-panel {
        padding: 12px;
    }

    .folder-header h3 {
        font-size: 14px;
    }

    .folder-name {
        font-size: 13px;
    }

    .records-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .record-item {
        flex-direction: column;
    }

    .record-thumbnail {
        width: 100%;
        height: 120px;
    }
}

/* PRO Badge */
.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pro-feature-lock {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.pro-feature-lock::after {
    content: '🔒 PRO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}