/* DocWin public styles - Professional Design */
:root {
    --docwin-primary: #2563eb;
    --docwin-primary-dark: #1d4ed8;
    --docwin-bg-light: #f8fafc;
    --docwin-border: #e2e8f0;
    --docwin-text: #1e293b;
    --docwin-text-light: #64748b;
    --docwin-text-muted: #94a3b8;
    --docwin-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --docwin-shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.1);
    --docwin-radius: 8px;
    --docwin-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Grouped subfolders */
.docwin-groups {
    display: block;
}

.docwin-group {
    border: 1px solid var(--docwin-border);
    border-radius: var(--docwin-radius);
    background: #fff;
    margin-bottom: 12px;
    overflow: hidden;
}

.docwin-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--docwin-bg-light);
    border-bottom: 1px solid var(--docwin-border);
}

.docwin-group-toggle {
    width: 28px;
    height: 28px;
    border: 1px solid var(--docwin-border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
}

.docwin-group-icon {
    width: 22px;
    height: 16px;
    display: inline-block;
    margin-right: 8px;
    background-repeat: no-repeat;
    background-position: center left;
    background-size: 22px 16px;
    /* Windows 11 style folder (blue) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='16' viewBox='0 0 22 16'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23bcd4ff'/><stop offset='1' stop-color='%230e73e4'/></linearGradient></defs><path d='M1.5 3.5a2 2 0 0 1 2-2h3.6a2 2 0 0 1 1.4.6l1.1 1.1a2 2 0 0 0 1.4.6H18.5a2 2 0 0 1 2 2v6.9a2 2 0 0 1-2 2H3.5a2 2 0 0 1-2-2V3.5Z' fill='url(%23g)'/><rect x='1.5' y='4.5' rx='1.6' ry='1.6' width='19' height='10' fill='%230e73e4' opacity='0.18'/></svg>");
}

/* Red variant for subfolders (level >= 1) */
.docwin-group-icon-red {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='16' viewBox='0 0 22 16'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ffc3c3'/><stop offset='1' stop-color='%23dc2626'/></linearGradient></defs><path d='M1.5 3.5a2 2 0 0 1 2-2h3.6a2 2 0 0 1 1.4.6l1.1 1.1a2 2 0 0 0 1.4.6H18.5a2 2 0 0 1 2 2v6.9a2 2 0 0 1-2 2H3.5a2 2 0 0 1-2-2V3.5Z' fill='url(%23g)'/><rect x='1.5' y='4.5' rx='1.6' ry='1.6' width='19' height='10' fill='%23dc2626' opacity='0.18'/></svg>");
}

/* Orange for deeper levels */
.docwin-group-icon-orange {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='16' viewBox='0 0 22 16'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%fff1e6'/><stop offset='1' stop-color='%23ea580c'/></linearGradient></defs><path d='M1.5 3.5a2 2 0 0 1 2-2h3.6a2 2 0 0 1 1.4.6l1.1 1.1a2 2 0 0 0 1.4.6H18.5a2 2 0 0 1 2 2v6.9a2 2 0 0 1-2 2H3.5a2 2 0 0 1-2-2V3.5Z' fill='url(%23g)'/><rect x='1.5' y='4.5' rx='1.6' ry='1.6' width='19' height='10' fill='%23ea580c' opacity='0.18'/></svg>");
}

.docwin-group-title {
    font-weight: 700;
}

.docwin-group-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--docwin-text-light);
}

.docwin-group-body {
    padding: 0;
}

.docwin-wrap {
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--docwin-text);
}

.docwin-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--docwin-text);
    border-bottom: 2px solid var(--docwin-primary);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Empty state styling */
.docwin-empty-state {
    padding: 3rem 1rem;
    text-align: center;
    background: var(--docwin-bg-light);
    border-radius: var(--docwin-radius);
    border: 1px dashed var(--docwin-border);
}

.docwin-empty-icon {
    margin: 0 auto 1rem;
    color: var(--docwin-text-light);
}

.docwin-empty-state p {
    font-size: 1rem;
    color: var(--docwin-text-light);
    margin: 0;
}

/* Search box styling */
.docwin-search-container {
    margin-bottom: 1.5rem;
}

.docwin-search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.docwin-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--docwin-text-light);
    pointer-events: none;
}

.docwin-search-input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1px solid var(--docwin-border);
    border-radius: var(--docwin-radius);
    background: #ffffff;
    color: var(--docwin-text);
    font-size: 0.95rem;
    transition: var(--docwin-transition);
}

.docwin-search-input:focus {
    outline: none;
    border-color: var(--docwin-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Professional Document Table */
.docwin-table {
    width: 100%;
    background: #ffffff;
    border-radius: var(--docwin-radius);
    box-shadow: var(--docwin-shadow);
    overflow: hidden;
    border-collapse: collapse;
    border: 1px solid var(--docwin-border);
}

.docwin-document-item {
    transition: var(--docwin-transition);
    cursor: pointer;
    border: none;
}

.docwin-document-item:hover {
    background-color: var(--docwin-bg-light);
    transform: translateY(-1px);
    box-shadow: var(--docwin-shadow-hover);
}

.docwin-icon-cell {
    width: 72px;
    padding: 16px 20px;
    border: none;
    vertical-align: middle;
}

.docwin-content-cell {
    padding: 16px 20px 16px 0;
    border: none;
    vertical-align: middle;
}

.docwin-document-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--docwin-radius);
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    background: var(--docwin-primary);
    color: white;
}

.docwin-document-icon svg {
    margin-bottom: 2px;
}

.docwin-file-ext {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* File type specific colors */
.docwin-file-pdf { 
    background: linear-gradient(135deg, #dc2626, #ef4444);
}
.docwin-file-word { 
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}
.docwin-file-excel { 
    background: linear-gradient(135deg, #059669, #10b981);
}
.docwin-file-powerpoint { 
    background: linear-gradient(135deg, #d97706, #f59e0b);
}
.docwin-file-archive { 
    background: linear-gradient(135deg, #7c2d12, #a3a3a3);
}
.docwin-file-text { 
    background: linear-gradient(135deg, #475569, #64748b);
}
.docwin-file-generic { 
    background: linear-gradient(135deg, #6b7280, #9ca3af);
}

.docwin-document-content {
    flex: 1;
    min-width: 0;
}

.docwin-document-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--docwin-text);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--docwin-transition);
}

.docwin-document-title:hover {
    color: var(--docwin-primary);
}

.docwin-document-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--docwin-text-light);
}

.docwin-file-size {
    font-weight: 500;
}

.docwin-download-hint {
    color: var(--docwin-text-muted);
    font-style: italic;
}

/* Stiluri eliminate pentru simplificare */

/* Responsive adjustments */
@media (max-width: 768px) {
    .docwin-document-item {
        padding: 12px 16px;
    }
    
    .docwin-document-icon {
        width: 48px;
        height: 48px;
        margin-right: 12px;
    }
    
    .docwin-document-title {
        font-size: 15px;
    }
    
    .docwin-document-meta {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .docwin-search-box {
        max-width: 100%;
    }
    
    .docwin-document-item {
        padding: 10px 12px;
    }
    
    .docwin-document-icon {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .docwin-file-ext {
        font-size: 8px;
    }
    
    .docwin-download-hint {
        display: none;
    }
}

