/* FCA Space Requests Manager - Styles */

/* Main Page Container */
.fca-space-requests-page {
    padding: 0;
    max-width: 100%;
    margin: 0 auto;
    height: calc(100vh - var(--fcom-header-height, 65px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header - Matching Fluent Community Style */
.fca-space-requests-header.fhr_content_layout_header {
    background: var(--fcom-primary-bg, #FFFFFF);
    border-bottom: 1px solid var(--fcom-primary-border, #E4E7EB);
    padding: 16px 24px;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fca-space-requests-header h1.fcom_page_title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: var(--fcom-primary-text, #19283a);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fca-space-requests-header .fcom_shape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--fcom-highlight-bg, #E7F3FF);
    border-radius: 50%;
}

.fca-space-requests-header .fcom_shape .el-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    color: var(--fcom-text-link, #216FDB);
}

.fca-space-requests-header .fcom_shape svg {
    width: 100%;
    height: 100%;
}

/* Stats Badge */
.fca-space-requests-stats {
    flex-shrink: 0;
}

.fca-pending-badge {
    background: var(--fcom-primary-button, #1877F2);
    color: var(--fcom-primary-button-text, #FFFFFF);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.9em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Main Container - Two Column Layout */
.fca-space-requests-container {
    display: flex;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

/* Left Sidebar - 30% */
.fca-space-requests-sidebar {
    width: 30%;
    max-width: 280px;
    min-width: 220px;
    background: var(--fcom-primary-bg, #FFFFFF);
    border-right: 1px solid var(--fcom-primary-border, #E4E7EB);
    overflow-y: auto;
    flex-shrink: 0;
}

.fca-space-requests-sidebar .fca-filter-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-left: 3px solid transparent;
    text-align: left;
    font-size: 14px;
    color: var(--fcom-menu-text, #65676B);
    font-weight: 500;
    width: 100%;
}

.fca-space-requests-sidebar .fca-filter-button:hover {
    background: var(--fcom-secondary-bg, #F0F2F5);
    color: var(--fcom-primary-text, #19283a);
}

.fca-space-requests-sidebar .fca-filter-button.active {
    background: var(--fcom-highlight-bg, #E7F3FF);
    border-left-color: var(--fcom-text-link, #216FDB);
    color: var(--fcom-text-link, #216FDB);
    font-weight: 600;
}

/* Right Main Area - 70% */
.fca-space-requests-main {
    flex: 1;
    overflow-y: auto;
    background: var(--fcom-secondary-bg, #F0F2F5);
    position: relative;
}

/* Bulk Actions Bar */
.fca-bulk-actions {
    background: var(--fcom-primary-bg, #FFFFFF);
    border-bottom: 1px solid var(--fcom-primary-border, #E4E7EB);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.fca-bulk-actions span {
    font-weight: 500;
    color: var(--fcom-primary-text, #19283a);
    margin-right: 8px;
}

.fca-btn-approve,
.fca-btn-reject,
.fca-btn-clear {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.fca-btn-approve {
    background: var(--fcom-success-color, #28a745);
    color: white;
}

.fca-btn-approve:hover:not(:disabled) {
    background: var(--fcom-success-color-dark, #218838);
}

.fca-btn-reject {
    background: var(--fcom-danger-color, #dc3545);
    color: white;
}

.fca-btn-reject:hover:not(:disabled) {
    background: var(--fcom-danger-color-dark, #c82333);
}

.fca-btn-clear {
    background: var(--fcom-secondary-bg, #F0F2F5);
    color: var(--fcom-secondary-text, #65676B);
}

.fca-btn-clear:hover:not(:disabled) {
    background: var(--fcom-primary-border, #E4E7EB);
}

.fca-btn-approve:disabled,
.fca-btn-reject:disabled,
.fca-btn-clear:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Request List */
.fca-request-section {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fca-request-item {
    background: var(--fcom-primary-bg, #FFFFFF);
    border: 1px solid var(--fcom-primary-border, #E4E7EB);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s ease;
}

.fca-request-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fca-request-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--fcom-text-link, #216FDB);
}

.fca-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.fca-request-details {
    flex: 1;
    min-width: 0;
}

.fca-request-details h3 {
    margin: 0 0 4px 0;
    font-size: 1em;
    font-weight: 600;
    color: var(--fcom-primary-text, #19283a);
    line-height: 1.4;
}

.fca-meta {
    margin: 0;
    font-size: 0.9em;
    color: var(--fcom-secondary-text, #65676B);
    line-height: 1.4;
}

.fca-request-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.fca-btn-approve-small,
.fca-btn-reject-small {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.fca-btn-approve-small {
    background: var(--fcom-success-color, #28a745);
    color: white;
}

.fca-btn-approve-small:hover:not(:disabled) {
    background: var(--fcom-success-color-dark, #218838);
}

.fca-btn-reject-small {
    background: var(--fcom-danger-color, #dc3545);
    color: white;
}

.fca-btn-reject-small:hover:not(:disabled) {
    background: var(--fcom-danger-color-dark, #c82333);
}

.fca-btn-approve-small:disabled,
.fca-btn-reject-small:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.fca-loading {
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.fca-loading-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--fcom-text-link, #216FDB);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fca-loading p {
    margin: 0;
    color: var(--fcom-secondary-text, #65676B);
}

/* No Results State */
.fca-no-results {
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.fca-no-results-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--fcom-secondary-text, #65676B);
    opacity: 0.5;
}

.fca-no-results h3 {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--fcom-primary-text, #19283a);
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fca-space-requests-container {
        flex-direction: column;
    }

    .fca-space-requests-sidebar {
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--fcom-primary-border, #E4E7EB);
        overflow-y: visible;
        max-height: none;
    }

    .fca-space-requests-sidebar .fca-filter-button {
        flex-shrink: 0;
        padding: 8px 14px;
        border-left: none;
        border-radius: 20px;
        white-space: nowrap;
        display: inline-block;
        width: auto;
        margin-right: 8px;
    }

    .fca-space-requests-sidebar {
        padding: 12px 16px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .fca-space-requests-main {
        padding: 16px;
    }

    .fca-request-section {
        padding: 0;
        gap: 12px;
    }

    .fca-request-item {
        padding: 12px;
        gap: 12px;
    }

    .fca-avatar {
        width: 40px;
        height: 40px;
    }

    .fca-request-actions {
        flex-direction: column;
        gap: 4px;
    }

    .fca-bulk-actions {
        padding: 8px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .fca-space-requests-header {
        background: var(--fcom-deep-bg, #18191A);
        border-color: var(--fcom-primary-border, #3A3B3C);
    }

    .fca-space-requests-sidebar {
        background: var(--fcom-deep-bg, #18191A);
        border-color: var(--fcom-primary-border, #3A3B3C);
    }

    .fca-space-requests-main {
        background: var(--fcom-secondary-bg, #242526);
    }

    .fca-bulk-actions {
        background: var(--fcom-primary-bg, #18191A);
        border-color: var(--fcom-primary-border, #3A3B3C);
    }

    .fca-request-item {
        background: var(--fcom-primary-bg, #18191A);
        border-color: var(--fcom-primary-border, #3A3B3C);
    }

    .fca-request-item:hover {
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    }

    .fca-request-details h3 {
        color: var(--fcom-primary-text, #E4E6EA);
    }

    .fca-meta {
        color: var(--fcom-secondary-text, #B0B3B8);
    }

    .fca-no-results h3 {
        color: var(--fcom-primary-text, #E4E6EA);
    }
}
