/* * Component: Followers Modal
 * Scope: .tw-modal-overlay (and children)
 */

/* --- Modal Structure --- */
.tw-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1055; /* Above header/sidebar */
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s linear;
}

.tw-modal-overlay.tw-open {
    display: flex;
    opacity: 1;
}

.tw-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 450px; /* Matches previous config */
    margin: 1.75rem auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Keep it within viewport */
    pointer-events: auto;
}

/* --- Header --- */
.tw-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.tw-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #212529;
}

.tw-modal-close {
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

.tw-modal-close:hover {
    color: #000;
}

/* --- Body & List --- */
.tw-modal-body {
    position: relative;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0; /* List items handle padding */
}

.tw-follower-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tw-follower-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
}

.tw-follower-item:last-child {
    border-bottom: none;
}

.tw-follower-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

.tw-follower-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
}

.tw-follower-name {
    font-weight: 600;
    color: #212529;
    text-decoration: none;
    font-size: 0.95rem;
}

.tw-follower-name:hover {
    text-decoration: underline;
}

.tw-follower-username {
    font-size: 0.8rem;
    color: #6c757d;
}

/* --- Footer --- */
.tw-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.tw-btn-close {
    background-color: #6c757d;
    color: #fff;
    border: none;
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.tw-btn-close:hover {
    background-color: #5c636a;
}

/* --- Spinner --- */
.tw-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: tw-spin 0.75s linear infinite;
    color: #0d6efd;
}

@keyframes tw-spin {
    100% { transform: rotate(360deg); }
}

.tw-spinner-container {
    padding: 2rem;
    text-align: center;
    width: 100%;
}