.wp-webdocs-explorer {
    position: relative;
    margin: 1.5rem 0;
}

.wp-webdocs-explorer.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wp-webdocs-title {
    margin: 0 0 1rem;
    font-size: 1.4rem;
}

.wp-webdocs-loading {
    display: none;
}

.wp-webdocs-explorer.is-loading .wp-webdocs-loading {
    display: block;
}

.wp-webdocs-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: wp-webdocs-spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes wp-webdocs-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Breadcrumb */
.wp-webdocs-breadcrumb ol {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.95rem;
}

.wp-webdocs-breadcrumb__item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.wp-webdocs-breadcrumb__item a {
    text-decoration: none;
    color: #0073aa;
}

.wp-webdocs-breadcrumb__item a:hover {
    text-decoration: underline;
}

.wp-webdocs-breadcrumb__item.is-current span {
    font-weight: 600;
    color: #23282d;
}

.wp-webdocs-breadcrumb__root .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
    vertical-align: middle;
}

.wp-webdocs-breadcrumb__root {
    display: inline-flex;
    align-items: center;
}

/* Folder cards */
.wp-webdocs-folders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.wp-webdocs-folder {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #fafafa;
    text-decoration: none;
    color: #23282d;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.wp-webdocs-explorer--front .wp-webdocs-folder {
    flex-direction: column;
    justify-content: center;
    gap: 0.45rem;
    min-height: 100px;
    text-align: center;
}

.wp-webdocs-explorer--front .wp-webdocs-folder__icon {
    line-height: 0;
}

.wp-webdocs-explorer--front .wp-webdocs-folder__icon svg {
    display: block;
    width: 30px;
    height: 30px;
}

.wp-webdocs-explorer--front .wp-webdocs-folder__name {
    width: 100%;
    text-align: center;
    line-height: 1.25;
}

.wp-webdocs-folder:hover {
    border-color: #0073aa;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    color: #0073aa;
}

.wp-webdocs-folder__icon {
    display: inline-flex;
    color: #f0b849;
    flex: 0 0 auto;
}

.wp-webdocs-folder__name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Files table */
.wp-webdocs-table-wrap {
    overflow-x: auto;
}

.wp-webdocs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.wp-webdocs-table th,
.wp-webdocs-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e6e6e6;
    vertical-align: middle;
}

.wp-webdocs-table thead th {
    background: #f5f5f5;
    font-weight: 600;
    white-space: nowrap;
}

.wp-webdocs-table tbody tr:hover {
    background: #f9f9f9;
}

.wp-webdocs-cell-name {
    overflow-wrap: anywhere;
}

.wp-webdocs-badge {
    display: inline-block;
    min-width: 42px;
    padding: 0.1rem 0.35rem;
    margin-right: 0.35rem;
    border-radius: 3px;
    background: #0591CA;/*#e53935;*/
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.03em;
}

.wp-webdocs-download {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    white-space: nowrap;
}

.wp-webdocs-col-action {
    width: 140px;
    text-align: right;
    white-space: nowrap;
}

.wp-webdocs-col-center {
    text-align: center;
}

.wp-webdocs-col-right {
    text-align: right;
}

.wp-webdocs-cell-muted {
    color: #6c757d;
}

.wp-webdocs-row--sub .wp-webdocs-cell-sub {
    padding-left: 1.75rem;
}

.wp-webdocs-subrow__mark {
    color: #6c757d;
    margin-right: 0.2rem;
}

.wp-webdocs-row--sub .wp-webdocs-col-action {
    width: 140px;
}

.wp-webdocs-table-container {
    margin: 1.5rem 0;
}

.wp-webdocs-table--responsive td[data-label]:empty::before {
    display: none;
}

.wp-webdocs-empty,
.wp-webdocs-notice {
    padding: 0.85rem 1rem;
    background: #f9f9f9;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    color: #666;
}

.wp-webdocs-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    margin: 1rem 0;
    background: #f9f9f9;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    color: #606060;
}

.wp-webdocs-empty-state .dashicons {
    font-size: 3rem;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
    color: #a0a0a0;
}

.wp-webdocs-empty-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #2c2c2c;
}

.wp-webdocs-empty-state p {
    margin: 0;
    max-width: 420px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .wp-webdocs-table thead {
        display: none;
    }

    .wp-webdocs-table,
    .wp-webdocs-table tbody,
    .wp-webdocs-table tr,
    .wp-webdocs-table td {
        display: block;
        width: 100%;
    }

    .wp-webdocs-table tr {
        margin-bottom: 0.75rem;
        border: 1px solid #e6e6e6;
        border-radius: 6px;
        padding: 0.35rem;
    }

    .wp-webdocs-table td {
        border: 0;
        padding: 0.35rem 0.5rem;
    }

    .wp-webdocs-table--responsive td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #6c757d;
        margin-right: 0.15rem;
    }

    .wp-webdocs-col-center,
    .wp-webdocs-col-right {
        text-align: left;
    }
}

/* Filters */
.wp-webdocs-table-block {
    margin: 1.5rem 0;
}

.wp-webdocs-table-block .wp-webdocs-table-container {
    margin-top: 0;
}

.wp-webdocs-filters__count {
    white-space: nowrap;
}

.wp-webdocs-filter-suffix {
    font-weight: 400;
}

.wp-webdocs-filter-clear .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
    vertical-align: text-bottom;
}

.wp-webdocs-filter-empty {
    margin-top: 0.75rem;
}
