/**
 * Profile Management UI Styles
 * Styles for verification tools, migration wizard, and documentation
 */

/* Profile Management Section */
.profile-management-section {
    margin-bottom: 2rem;
}

/* Integrity Check Results */
.integrity-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.integrity-result-card {
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.integrity-result-card.success {
    border-color: rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, transparent 100%);
}

.integrity-result-card.warning {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
}

.integrity-result-card.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
}

.integrity-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.integrity-result-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.integrity-result-title i {
    width: 24px;
    height: 24px;
}

.integrity-result-card.success .integrity-result-title i {
    color: #22c55e;
}

.integrity-result-card.warning .integrity-result-title i {
    color: #f59e0b;
}

.integrity-result-card.error .integrity-result-title i {
    color: #ef4444;
}

.profile-name {
    font-family: 'Courier New', monospace;
}

.active-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #60a5fa;
}

.integrity-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
}

.integrity-status-badge.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.integrity-status-badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.integrity-status-badge.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.integrity-result-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 0.875rem;
    color: var(--color-text-primary);
    font-family: 'Courier New', monospace;
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-success {
    color: #22c55e;
}

.text-muted {
    color: var(--color-text-secondary);
}

.integrity-issues {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
}

.integrity-issues strong {
    color: #ef4444;
    display: block;
    margin-bottom: 0.5rem;
}

.integrity-issues ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.integrity-issues li {
    padding: 0.25rem 0;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.integrity-issues li::before {
    content: "⚠️ ";
    margin-right: 0.5rem;
}

/* Loading States */
.integrity-check-loading,
.migration-check-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.integrity-check-loading i,
.migration-check-loading i {
    width: 48px;
    height: 48px;
    color: var(--color-accent-primary);
    margin-bottom: 1rem;
}

.spinning {
    animation: spin 1s linear infinite;
}

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

/* Error States */
.integrity-check-error,
.migration-check-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
}

.integrity-check-error i,
.migration-check-error i {
    width: 48px;
    height: 48px;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-message {
    color: #ef4444;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Migration Status */
.migration-status-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.migration-info-card {
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.migration-info-card.success {
    border-color: rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, transparent 100%);
}

.migration-info-card.warning {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
}

.migration-info-card h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.migration-info-card h4 i {
    width: 24px;
    height: 24px;
}

.migration-info-card.success h4 i {
    color: #22c55e;
}

.migration-info-card.warning h4 i {
    color: #f59e0b;
}

.migration-info-card p {
    margin: 0.5rem 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.code-block {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.orphaned-data-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.orphaned-data-list li {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.orphaned-data-list li strong {
    color: #f59e0b;
    font-size: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* Documentation Links */
.profile-doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.profile-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-accent-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.profile-doc-link:hover {
    background: var(--color-active-bg);
    border-color: var(--color-accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.profile-doc-link i {
    width: 16px;
    height: 16px;
}

/* Help Icons with Tooltips */
.profile-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 50%;
    color: #60a5fa;
    cursor: help;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.profile-help-icon:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: scale(1.15);
}

.profile-help-icon i {
    width: 12px;
    height: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .integrity-result-card,
    .migration-info-card {
        padding: 1rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .detail-value {
        max-width: 100%;
        text-align: left;
    }

    .profile-doc-links {
        flex-direction: column;
    }

    .profile-doc-link {
        justify-content: center;
    }
}

/* FAQ Section */
.faq-item {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--color-accent-primary);
    background: var(--color-bg-hover);
}

.faq-item[open] {
    border-color: var(--color-accent-primary);
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text-primary);
    cursor: pointer;
    user-select: none;
}

.faq-question i {
    width: 16px;
    height: 16px;
    color: var(--color-accent-primary);
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question i {
    transform: rotate(90deg);
}

.faq-answer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.faq-answer p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.faq-answer code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    color: #60a5fa;
}

summary {
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}
