/**
 * Profile Ranking Integration Styles
 * Extracted from Profile-Ranking-Integration.php
 */

.hk-sp-ranking-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.hk-sp-ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 0;
}

.hk-sp-ranking-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1em;
    padding-left: 10px;
    border-left: 4px solid #4783b5;
    line-height: 1.2;
}

.hk-sp-ranking-badge {
    background: #eff6ff;
    color: #4783b5;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.9em;
    font-weight: 600;
}

.hk-sp-ranking-badge strong {
    font-size: 1.3em;
    color: #4783b5;
}

.hk-sp-ranking-neighbors-grid {
    display: flex;
    gap: 20px;
    flex: 1; /* Push footer down */
}

.hk-sp-neighbor-col {
    flex: 1;
    min-width: 0; /* Prevent flex overflow */
}

.hk-sp-ranking-subtitle {
    margin-bottom: 8px;
    font-size: 0.85em;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hk-sp-neighbor-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hk-sp-neighbor-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    white-space: nowrap;
}

.hk-sp-neighbor-rank {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 32px;
    text-align: center;
    font-weight: 600;
}

.hk-sp-neighbor-rank.r-high {
    background: #ecfdf5;
    color: #047857;
}

.hk-sp-neighbor-rank.r-low {
    background: #fef2f2;
    color: #b91c1c;
}

.hk-sp-neighbor-list a {
    text-decoration: none;
    color: #334155;
    font-size: 0.95em;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
    font-weight: 500;
}

.hk-sp-neighbor-list a:hover {
    color: #2563eb;
}

.hk-sp-neighbor-empty {
    color: #94a3b8;
    font-size: 0.9em;
    font-style: italic;
}

.hk-sp-ranking-link {
    margin-top: 16px;
    text-align: right;
    font-size: 0.85em;
}

.hk-sp-ranking-link a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.hk-sp-ranking-link a:hover {
    color: #3b82f6;
}

/* =========================================
   Header Ranking Badges (High Specificity)
   ========================================= */

#hk-sp-header-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 10px;
}

#hk-sp-header-badges-container .hk-sp-badge {
    display: inline-flex !important;
    align-items: center !important;
    background-color: #fffbeb !important; /* Amber-50 */
    border: 1px solid #fcd34d !important; /* Amber-300 */
    border-radius: 9999px !important;
    padding: 6px 14px !important;
    text-decoration: none !important;
    color: #92400e !important; /* Amber-800 */
    font-size: 14px !important;
    line-height: 1.2 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    margin: 0 !important;
}

#hk-sp-header-badges-container .hk-sp-badge:hover {
    background-color: #fef3c7 !important; /* Amber-100 */
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.08) !important;
    color: #78350f !important; /* Amber-900 */
}

#hk-sp-header-badges-container .hk-sp-badge i {
    margin-right: 6px !important;
    color: #d97706 !important; /* Amber-600 */
    font-size: 14px !important;
}

#hk-sp-header-badges-container .hk-sp-badge-label {
    margin-right: 4px !important;
    font-weight: 500 !important;
    color: inherit !important;
}

#hk-sp-header-badges-container .hk-sp-badge-val {
    font-weight: 700 !important;
    font-family: 'Arial', sans-serif !important;
    color: inherit !important;
}
