/* MC4 Nextcloud Downloads Frontend */
.mc4-nc-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 20px;
}

.mc4-nc-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    max-width: 700px;
    margin: 0 auto;
    overflow: hidden;
}

/* Header */
.mc4-nc-header {
    text-align: center;
    padding: 40px 30px 20px;
}

.mc4-nc-header-icon {
    width: 64px;
    height: 64px;
    background: #0082c9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.mc4-nc-header-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.mc4-nc-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.mc4-nc-description {
    color: #666;
    margin: 0;
}

/* Breadcrumb */
.mc4-nc-breadcrumb {
    padding: 12px 24px;
    background: #f8f9fa;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

.mc4-nc-breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.mc4-nc-breadcrumb a:hover {
    color: #0082c9;
}

.mc4-nc-breadcrumb span {
    margin: 0 6px;
    color: #ccc;
}

/* Search */
.mc4-nc-filters {
    padding: 16px 24px;
}

.mc4-nc-search {
    position: relative;
}

.mc4-nc-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.mc4-nc-search-input:focus {
    border-color: #0082c9;
}

.mc4-nc-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: #999;
}

/* Files */
.mc4-nc-files {
    padding: 8px 24px 24px;
}

.mc4-nc-file {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.mc4-nc-file:last-child {
    margin-bottom: 0;
}

.mc4-nc-file:hover {
    background: #f0f2f5;
    transform: translateX(4px);
}

.mc4-nc-file-folder:hover {
    cursor: pointer;
}

.mc4-nc-file-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-right: 14px;
}

.mc4-nc-file-icon svg {
    width: 100%;
    height: 100%;
}

.mc4-nc-file-info {
    flex: 1;
    min-width: 0;
}

.mc4-nc-file-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc4-nc-file-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Download Button */
.mc4-nc-download-btn {
    width: 40px;
    height: 40px;
    background: #0082c9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    text-decoration: none;
}

.mc4-nc-download-btn:hover {
    filter: brightness(0.9);
    transform: scale(1.05);
}

.mc4-nc-download-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Folder Link */
.mc4-nc-folder-link {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    text-decoration: none;
    color: #666;
}

.mc4-nc-folder-link:hover {
    border-color: #0082c9;
    color: #0082c9;
}

.mc4-nc-folder-link svg {
    width: 20px;
    height: 20px;
}

/* States */
.mc4-nc-empty,
.mc4-nc-error,
.mc4-nc-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.mc4-nc-error {
    color: #d63638;
}

/* Loading */
.mc4-nc-loading {
    text-align: center;
    padding: 40px;
}

.mc4-nc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #0082c9;
    border-radius: 50%;
    animation: mc4-nc-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes mc4-nc-spin {
    to { transform: rotate(360deg); }
}

/* Grid Layout */
.mc4-nc-layout-grid .mc4-nc-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.mc4-nc-layout-grid .mc4-nc-file {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    margin-bottom: 0;
}

.mc4-nc-layout-grid .mc4-nc-file-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
}

.mc4-nc-layout-grid .mc4-nc-file-info {
    margin-bottom: 12px;
}

.mc4-nc-layout-grid .mc4-nc-file-meta {
    justify-content: center;
}

.mc4-nc-layout-grid .mc4-nc-download-btn,
.mc4-nc-layout-grid .mc4-nc-folder-link {
    width: 100%;
    height: 36px;
}

/* Responsive */
@media (max-width: 600px) {
    .mc4-nc-header { padding: 30px 20px 15px; }
    .mc4-nc-filters { padding: 12px 16px; }
    .mc4-nc-files { padding: 8px 16px 16px; }
    .mc4-nc-breadcrumb { padding: 10px 16px; }
}
