/**
 * VP Client Matching - Styles
 * All styles are scoped to #vp-client-matching-app to avoid conflicts
 */

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Container Reset */
#vp-client-matching-app {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.5;
    font-size: 16px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 1000px;
    margin: 0 auto;
}

#vp-client-matching-app *,
#vp-client-matching-app *::before,
#vp-client-matching-app *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Header */
#vp-client-matching-app .vp-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

#vp-client-matching-app .vp-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#vp-client-matching-app .vp-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#vp-client-matching-app .vp-logo-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

#vp-client-matching-app .vp-logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: #7b1fa2;
    line-height: 1.3;
}

#vp-client-matching-app .vp-logo-text span {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: #9c27b0;
    letter-spacing: 0.5px;
}

#vp-client-matching-app .vp-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #666;
    font-size: 0.9rem;
}

#vp-client-matching-app .vp-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9c27b0, #e91e63);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Main Content */
#vp-client-matching-app .vp-main {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

#vp-client-matching-app .vp-page-title {
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
    color: #333 !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    border: none !important;
}

#vp-client-matching-app .vp-page-subtitle {
    color: #666 !important;
    margin: 0 0 2rem 0 !important;
    padding: 0 !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
}

/* Stats Bar */
#vp-client-matching-app .vp-stats-bar {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

#vp-client-matching-app .vp-stat-card {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 1rem;
}

#vp-client-matching-app .vp-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#vp-client-matching-app .vp-stat-icon svg {
    width: 24px;
    height: 24px;
}

#vp-client-matching-app .vp-stat-icon.pending {
    background: #fff3e0;
    color: #f57c00;
}

#vp-client-matching-app .vp-stat-icon.mapped {
    background: #e8f5e9;
    color: #43a047;
}

#vp-client-matching-app .vp-stat-icon.rejected {
    background: #ffebee;
    color: #e53935;
}

#vp-client-matching-app .vp-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

#vp-client-matching-app .vp-stat-label {
    font-size: 0.85rem;
    color: #666;
}

/* Client Cards */
#vp-client-matching-app .vp-client-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#vp-client-matching-app .vp-client-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}

#vp-client-matching-app .vp-client-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

#vp-client-matching-app .vp-client-card.hiding {
    opacity: 0;
    transform: translateX(-20px);
}

#vp-client-matching-app .vp-client-card-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    padding: 1.5rem;
    gap: 1.5rem;
}

#vp-client-matching-app .vp-client-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#vp-client-matching-app .vp-client-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
    margin: 0;
}

#vp-client-matching-app .vp-client-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

#vp-client-matching-app .vp-suggestion-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
}

#vp-client-matching-app .vp-suggestion-badge svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

#vp-client-matching-app .vp-match-confidence {
    font-size: 0.75rem;
    color: #43a047;
    margin-top: 0.25rem;
    font-weight: 500;
}

#vp-client-matching-app .vp-match-confidence.low {
    color: #f57c00;
}

/* Action Buttons */
#vp-client-matching-app .vp-action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    align-items: center;
}

#vp-client-matching-app .vp-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
    line-height: 1;
    font-family: inherit;
}

#vp-client-matching-app .vp-btn svg {
    width: 18px;
    height: 18px;
}

#vp-client-matching-app .vp-btn-approve {
    background: #43a047;
    color: white !important;
}

#vp-client-matching-app .vp-btn-approve:hover {
    background: #388e3c;
    transform: translateY(-1px);
    color: white !important;
}

#vp-client-matching-app .vp-btn-reject {
    background: white;
    color: #e53935 !important;
    border: 2px solid #e53935;
}

#vp-client-matching-app .vp-btn-reject:hover {
    background: #ffebee;
    transform: translateY(-1px);
    color: #e53935 !important;
}

/* Mapped State */
#vp-client-matching-app .vp-client-card.mapped {
    border-left: 4px solid #43a047;
}

#vp-client-matching-app .vp-client-card.mapped .vp-client-card-content {
    background: #fafffe;
}

#vp-client-matching-app .vp-mapped-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #43a047;
    font-weight: 600;
    font-size: 0.95rem;
}

#vp-client-matching-app .vp-mapped-status svg {
    width: 24px;
    height: 24px;
}

#vp-client-matching-app .vp-undo-link {
    color: #888 !important;
    font-size: 0.8rem;
    text-decoration: underline !important;
    cursor: pointer;
    margin-left: 1rem;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

#vp-client-matching-app .vp-undo-link:hover {
    color: #666 !important;
}

/* Arrow Icon */
#vp-client-matching-app .vp-arrow-icon {
    color: #ccc;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}

#vp-client-matching-app .vp-arrow-icon svg {
    width: 24px;
    height: 24px;
}

/* Rejected State */
#vp-client-matching-app .vp-client-card.rejected {
    border-left: 4px solid #e53935;
    opacity: 0.7;
}

#vp-client-matching-app .vp-rejected-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e53935;
    font-weight: 600;
    font-size: 0.95rem;
}

#vp-client-matching-app .vp-rejected-status svg {
    width: 24px;
    height: 24px;
}

#vp-client-matching-app .vp-strikethrough {
    text-decoration: line-through;
    color: #999 !important;
}

/* Search */
#vp-client-matching-app .vp-search-bar {
    margin-bottom: 1.5rem;
}

#vp-client-matching-app .vp-search-input {
    width: 100%;
    max-width: 400px;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.875rem center;
    background-size: 20px;
    background-color: white;
    font-family: inherit;
    box-shadow: none !important;
}

#vp-client-matching-app .vp-search-input:focus {
    outline: none;
    border-color: #9c27b0 !important;
    box-shadow: none !important;
}

/* Section Headers */
#vp-client-matching-app .vp-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

#vp-client-matching-app .vp-section-header h2 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #666 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.3 !important;
}

#vp-client-matching-app .vp-section-count {
    background: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

#vp-client-matching-app .vp-section.hidden {
    display: none;
}

/* Footer */
#vp-client-matching-app .vp-footer {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 0.85rem;
}

#vp-client-matching-app .vp-footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#vp-client-matching-app .vp-footer-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border-radius: 50%;
}

/* Toast Notification */
#vp-client-matching-app .vp-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white !important;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

#vp-client-matching-app .vp-toast.show {
    transform: translateY(0);
    opacity: 1;
}

#vp-client-matching-app .vp-toast.success {
    background: #43a047;
}

#vp-client-matching-app .vp-toast.error {
    background: #e53935;
}

/* Empty State */
#vp-client-matching-app .vp-empty-state {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    #vp-client-matching-app .vp-client-card-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    #vp-client-matching-app .vp-action-buttons {
        justify-content: flex-start;
    }

    #vp-client-matching-app .vp-stats-bar {
        flex-direction: column;
    }

    #vp-client-matching-app .vp-arrow-icon {
        display: none;
    }

    #vp-client-matching-app .vp-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    #vp-client-matching-app .vp-main {
        padding: 1rem;
    }

    #vp-client-matching-app .vp-search-input {
        max-width: 100%;
    }
}
