/**
 * Storage Explorer - File browser UI for integrated storage providers
 * Classes: is-storage-*
 */

/* ==========================================================================
   Not Configured State
   ========================================================================== */

.is-storage-not-configured {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid rgb(229 231 235);
    background: white;
    padding: 3rem;
}

.dark .is-storage-not-configured {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
}

.is-storage-not-configured-icon {
    margin-bottom: 1rem;
    border-radius: 9999px;
    background: rgb(243 244 246);
    padding: 1rem;
}

.dark .is-storage-not-configured-icon {
    background: rgb(31 41 55);
}

.is-storage-not-configured-icon svg {
    width: 3rem;
    height: 3rem;
    color: rgb(156 163 175);
}

.dark .is-storage-not-configured-icon svg {
    color: rgb(107 114 128);
}

.is-storage-not-configured h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: rgb(17 24 39);
}

.dark .is-storage-not-configured h3 {
    color: white;
}

.is-storage-not-configured p {
    margin-bottom: 1.5rem;
    max-width: 28rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgb(107 114 128);
}

.dark .is-storage-not-configured p {
    color: rgb(156 163 175);
}

.is-storage-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    background: var(--primary-600, #2563eb);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.15s;
    text-decoration: none;
}

.is-storage-settings-btn:hover {
    background: var(--primary-500, #3b82f6);
}

.is-storage-settings-btn svg {
    width: 1rem;
    height: 1rem;
}

/* ==========================================================================
   Toolbar (Driver Badge + Breadcrumbs + Refresh)
   ========================================================================== */

.is-storage-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.75rem 0.75rem 0 0;
    border: 1px solid rgb(229 231 235);
    border-bottom: none;
    background: rgb(249 250 251);
    padding: 0.75rem 1rem;
}

.dark .is-storage-toolbar {
    border-color: rgb(55 65 81);
    background: rgb(31 41 55);
}

.is-storage-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    min-width: 0;
}

/* Driver badge */
.is-storage-driver-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 9999px;
    background: var(--primary-50, #eff6ff);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-700, #1d4ed8);
    flex-shrink: 0;
}

.dark .is-storage-driver-badge {
    background: rgba(var(--primary-500-rgb, 59 130 246), 0.15);
    color: var(--primary-400, #60a5fa);
}

.is-storage-driver-badge svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Breadcrumb separator chevron */
.is-storage-separator {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: rgb(156 163 175);
}

.dark .is-storage-separator {
    color: rgb(107 114 128);
}

/* Breadcrumb nav */
.is-storage-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.is-storage-breadcrumb-chevron {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    color: rgb(156 163 175);
}

.dark .is-storage-breadcrumb-chevron {
    color: rgb(107 114 128);
}

.is-storage-breadcrumb-btn {
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-weight: 500;
    color: rgb(55 65 81);
    transition: all 0.15s;
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
}

.is-storage-breadcrumb-btn:hover {
    background: rgb(243 244 246);
    color: var(--primary-600, #2563eb);
}

.dark .is-storage-breadcrumb-btn {
    color: rgb(209 213 219);
}

.dark .is-storage-breadcrumb-btn:hover {
    background: rgb(31 41 55);
    color: var(--primary-400, #60a5fa);
}

.is-storage-breadcrumb-btn.is-active {
    color: var(--primary-600, #2563eb);
}

.dark .is-storage-breadcrumb-btn.is-active {
    color: var(--primary-400, #60a5fa);
}

/* Refresh button */
.is-storage-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(209 213 219);
    background: white;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(55 65 81);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.15s;
    flex-shrink: 0;
    cursor: pointer;
}

.is-storage-refresh-btn:hover {
    background: rgb(249 250 251);
}

.dark .is-storage-refresh-btn {
    border-color: rgb(75 85 99);
    background: rgb(31 41 55);
    color: rgb(209 213 219);
}

.dark .is-storage-refresh-btn:hover {
    background: rgb(55 65 81);
}

.is-storage-refresh-btn svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* ==========================================================================
   Error Message
   ========================================================================== */

.is-storage-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(252 165 165);
    background: rgb(254 242 242);
    padding: 1rem;
}

.dark .is-storage-error {
    border-color: rgb(127 29 29);
    background: rgba(127, 29, 29, 0.1);
}

.is-storage-error svg {
    width: 1.25rem;
    height: 1.25rem;
    color: rgb(239 68 68);
}

.is-storage-error p {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(185 28 28);
}

.dark .is-storage-error p {
    color: rgb(248 113 113);
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.is-storage-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid rgb(229 231 235);
    background: white;
    padding: 3rem;
}

.dark .is-storage-loading {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
}

.is-storage-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.is-storage-loading-inner svg {
    width: 2rem;
    height: 2rem;
    color: var(--primary-500, #3b82f6);
    animation: spin 1s linear infinite;
}

.is-storage-loading-inner span {
    font-size: 0.875rem;
    color: rgb(107 114 128);
}

.dark .is-storage-loading-inner span {
    color: rgb(156 163 175);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.is-storage-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid rgb(229 231 235);
    background: white;
    padding: 3rem;
}

.dark .is-storage-empty {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
}

.is-storage-empty-icon {
    margin-bottom: 0.75rem;
    border-radius: 9999px;
    background: rgb(243 244 246);
    padding: 0.75rem;
}

.dark .is-storage-empty-icon {
    background: rgb(31 41 55);
}

.is-storage-empty-icon svg {
    width: 2rem;
    height: 2rem;
    color: rgb(156 163 175);
}

.dark .is-storage-empty-icon svg {
    color: rgb(107 114 128);
}

.is-storage-empty p {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(107 114 128);
}

.dark .is-storage-empty p {
    color: rgb(156 163 175);
}

/* ==========================================================================
   File/Folder Table
   ========================================================================== */

.is-storage-table-wrapper {
    overflow: hidden;
    border-radius: 0 0 0.75rem 0.75rem;
    border: 1px solid rgb(229 231 235);
    background: white;
}

.dark .is-storage-table-wrapper {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
}

.is-storage-table {
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
}

.is-storage-table thead tr {
    border-bottom: 1px solid rgb(229 231 235);
    background: rgb(249 250 251);
}

.dark .is-storage-table thead tr {
    border-bottom-color: rgb(55 65 81);
    background: rgba(31, 41, 55, 0.5);
}

.is-storage-table th {
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107 114 128);
}

.dark .is-storage-table th {
    color: rgb(156 163 175);
}

.is-storage-table tbody {
    divide-y: 1px solid rgb(229 231 235);
}

.is-storage-table tbody tr {
    border-bottom: 1px solid rgb(243 244 246);
    transition: background-color 0.15s;
}

.is-storage-table tbody tr:last-child {
    border-bottom: none;
}

.dark .is-storage-table tbody tr {
    border-bottom-color: rgb(31 41 55);
}

.is-storage-table tbody tr:hover {
    background: rgb(249 250 251);
}

.dark .is-storage-table tbody tr:hover {
    background: rgba(31, 41, 55, 0.5);
}

.is-storage-table tbody tr.is-storage-folder-row {
    cursor: pointer;
}

.is-storage-table td {
    padding: 0.625rem 1rem;
}

/* Name cell */
.is-storage-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.is-storage-name-cell .is-storage-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.is-storage-name-cell .is-storage-icon.is-folder-icon {
    color: rgb(245 158 11);
}

.dark .is-storage-name-cell .is-storage-icon.is-folder-icon {
    color: rgb(251 191 36);
}

.is-storage-name-cell .is-storage-icon.is-file-icon {
    color: rgb(156 163 175);
}

.dark .is-storage-name-cell .is-storage-icon.is-file-icon {
    color: rgb(107 114 128);
}

.is-storage-name-cell .is-storage-filename {
    font-weight: 500;
    color: rgb(17 24 39);
}

.dark .is-storage-name-cell .is-storage-filename {
    color: white;
}

.is-storage-folder-row:hover .is-storage-filename {
    color: var(--primary-600, #2563eb);
}

.dark .is-storage-folder-row:hover .is-storage-filename {
    color: var(--primary-400, #60a5fa);
}

.is-storage-name-cell .is-storage-child-count {
    font-size: 0.75rem;
    color: rgb(156 163 175);
}

.dark .is-storage-name-cell .is-storage-child-count {
    color: rgb(107 114 128);
}

/* Meta columns (size, modified) */
.is-storage-meta {
    color: rgb(107 114 128);
}

.dark .is-storage-meta {
    color: rgb(156 163 175);
}

/* Download button */
.is-storage-download-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 0.5rem;
    padding: 0.375rem;
    color: rgb(156 163 175);
    transition: all 0.15s;
    border: none;
    background: none;
    cursor: pointer;
}

.is-storage-download-btn:hover {
    background: rgb(243 244 246);
    color: rgb(55 65 81);
}

.dark .is-storage-download-btn:hover {
    background: rgb(55 65 81);
    color: rgb(209 213 219);
}

.is-storage-download-btn svg {
    width: 1rem;
    height: 1rem;
}

/* ==========================================================================
   Item Count Footer
   ========================================================================== */

.is-storage-item-count {
    padding: 0.25rem;
    font-size: 0.75rem;
    color: rgb(156 163 175);
}

.dark .is-storage-item-count {
    color: rgb(107 114 128);
}
