/* Connections Page Styles - Phronesis Social Brand */

.connections-page {
    max-width: 100%;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

.connections-page h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-charcoal);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.page-description {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-stone-gray);
    margin: 0;
    line-height: 1.6;
}

.loading-state {
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--color-stone-gray);
}

.connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Card is now a component, these styles apply within cards */
.connection-card.connected {
    border-left: 3px solid var(--color-success);
}

.connection-card.disconnected {
    border-left: 3px solid rgba(108, 117, 125, 0.2);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(108, 117, 125, 0.15);
}

.platform-icon {
    font-size: 1.5rem;
    color: var(--color-mediterranean-blue);
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-name {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-charcoal);
    letter-spacing: -0.01em;
    flex: 1;
}

.connection-count {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    background-color: var(--color-mediterranean-blue);
    color: white;
    border-radius: 12px;
    letter-spacing: 0.01em;
}

/* Container for multiple connections per platform */
.platform-connections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Individual connection item when there are multiple accounts */
.connection-item {
    padding: 0.875rem;
    background-color: rgba(44, 95, 141, 0.02);
    border: 1px solid rgba(44, 95, 141, 0.08);
    border-radius: 8px;
}

.connection-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* "Add Another Account" button container */
.add-another-account {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(108, 117, 125, 0.1);
    margin-top: 0.25rem;
}

.connection-status {
    margin-bottom: 0.25rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.status-badge i {
    font-size: 0.75rem;
}

.status-active {
    background-color: rgba(34, 197, 94, 0.1);
    color: rgb(22, 163, 74);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-inactive {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgb(220, 38, 38);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-expired {
    background-color: rgba(251, 191, 36, 0.1);
    color: rgb(217, 119, 6);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-reauth {
    background-color: rgba(251, 191, 36, 0.12);
    color: rgb(217, 119, 6);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.platform-username,
.connection-date,
.last-used {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: var(--color-stone-gray);
    margin: 0;
    line-height: 1.5;
}

.platform-username strong,
.connection-date strong,
.last-used strong {
    font-weight: 500;
    color: var(--color-charcoal);
}

.not-connected-message {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--color-stone-gray);
    font-style: italic;
    margin-bottom: 0.75rem;
}

.connection-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons are now components - these classes kept for backwards compatibility */

.error-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background-color: rgba(239, 68, 68, 0.08);
    color: rgb(220, 38, 38);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
}

.error-message i {
    font-size: 1rem;
}

.success-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background-color: rgba(34, 197, 94, 0.08);
    color: rgb(22, 163, 74);
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
}

.success-message i {
    font-size: 1rem;
}

/* OAuth Callback Page Styles */

.oauth-callback-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.processing-state,
.success-state,
.error-state {
    text-align: center;
    max-width: 500px;
}

.processing-state h2,
.success-state h2,
.error-state h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1a202c;
}

.processing-state p,
.success-state p,
.error-state p {
    font-size: 1.125rem;
    color: #718096;
    margin-bottom: 1rem;
}

.spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 2rem;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.success-icon {
    font-size: 4rem;
    color: #48bb78;
    margin-bottom: 1rem;
}

.error-icon {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

/* Responsive Design */

@media (max-width: 768px) {
    .connections-grid {
        grid-template-columns: 1fr;
    }

    .connection-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
