/* Bee Fit Global Plugin Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

#beefit-supporter-dashboard,
#beefit-leaderboard-container,
.bf-athlete-profile-card {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Header & Panels */
.bf-panel-header, .bf-leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.bf-panel-header h2, .bf-leaderboard-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
}

/* Dynamic Alert Splash Zone */
#bf-splash-zone {
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border: 2px dashed #cbd5e1;
}

.bf-splash-idle {
    background-color: #f8fafc;
    color: #64748b;
    border-color: #cbd5e1 !important;
}

.bf-splash-success {
    background-color: #ecfdf5;
    color: #059669;
    border-color: #34d399 !important;
    animation: pulse-green 0.5s ease-in-out;
}

.bf-splash-fail {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #f87171 !important;
    animation: shake-red 0.4s ease-in-out;
}

@keyframes pulse-green {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 0 15px rgba(52, 211, 153, 0.4); }
    100% { transform: scale(1); }
}

@keyframes shake-red {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Phase Selector Toggle */
.bf-phase-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bf-radio-card {
    cursor: pointer;
    position: relative;
    display: block;
}

.bf-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.bf-radio-content {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bf-radio-card input[type="radio"]:checked + .bf-radio-content {
    background: #fef9c3; /* Soft bee honey tint */
    border-color: #eab308; /* Bee Yellow */
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.15);
}

.bf-radio-content .bf-icon {
    font-size: 1.5rem;
}

.bf-radio-content .bf-label {
    font-weight: 600;
    color: #334155;
}

/* Input Hub Trio */
.bf-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.bf-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.bf-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* Button UI */
.bf-btn, .bf-btn-accent {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    margin-top: auto;
}

.bf-btn {
    background-color: #0f172a;
    color: #ffffff;
}

.bf-btn:hover {
    background-color: #1e293b;
}

.bf-btn-accent {
    background-color: #eab308;
    color: #0f172a;
}

.bf-btn-accent:hover {
    background-color: #ca8a04;
}

/* QR Camera Box */
#bf-reader-container {
    width: 100%;
    margin-bottom: 1rem;
}

#bf-reader {
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

/* NFC Box */
.bf-nfc-status-box {
    text-align: center;
    padding: 2rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#bf-nfc-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Manual Lookup & Search Form */
.bf-manual-form {
    position: relative;
}

#bf-search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.bf-search-dropdown {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.bf-search-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.bf-search-item:hover {
    background-color: #fef9c3;
}

.bf-pairing-subbox {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #fef08a;
    border-radius: 8px;
}

.bf-pairing-subbox h4 {
    margin-top: 0;
    font-size: 0.95rem;
}

.bf-pairing-subbox input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

/* Rolling Activity Stream */
.bf-rolling-stream-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}

#bf-rolling-stream {
    list-style: none;
    padding: 0;
    margin: 0;
}

#bf-rolling-stream li {
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #34d399;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.bf-empty-stream {
    border-left: 4px solid #cbd5e1 !important;
    color: #94a3b8;
    justify-content: center !important;
}

/* Public Leaderboard Frame */
.bf-filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
}

.bf-filter-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bf-filter-col label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.bf-filter-col select, .bf-filter-col input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: #fff;
}

/* Table Design */
.bf-table-responsive {
    overflow-x: auto;
}

.bf-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.bf-leaderboard-table th {
    background-color: #0f172a;
    color: #ffffff;
    padding: 0.85rem 1rem;
    font-weight: 600;
}

.bf-leaderboard-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.bf-leaderboard-table tr:hover {
    background-color: #f8fafc;
}

.bf-loading {
    text-align: center;
    color: #94a3b8;
    padding: 2rem !important;
}

/* Athlete Profile Card */
.bf-athlete-profile-card {
    text-align: center;
    max-width: 480px !important;
}

.bf-profile-header {
    margin-bottom: 1.5rem;
}

.bf-avatar {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.bf-profile-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #0f172a;
}

.bf-bib {
    font-size: 0.9rem;
    color: #eab308;
    font-weight: 600;
}

.bf-profile-details {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    text-align: left;
}

.bf-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.bf-detail-row.Highlight {
    background: #fef9c3;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 700;
    color: #854d0e;
}
