/**
 * Realm Firsts Module Stylesheet
 * High quality Warcraft themed styles with responsive support
 */

.realm-firsts-wrapper {
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #e0e0e0;
}

/* Header & Realm Picker */
.rf-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rf-title {
    margin: 0 0 5px 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #f7d070;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

.rf-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #9e9e9e;
}

.rf-realm-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rf-picker-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c7c7c7;
}

.rf-select {
    background: #1a1e24;
    color: #f5f5f5;
    border: 1px solid #3b4252;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rf-select:focus {
    outline: none;
    border-color: #f7d070;
    box-shadow: 0 0 5px rgba(247, 208, 112, 0.4);
}

/* Statistics Dashboard */
.rf-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.rf-stat-card {
    background: linear-gradient(135deg, rgba(28, 33, 40, 0.9) 0%, rgba(20, 24, 30, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rf-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(247, 208, 112, 0.3);
}

.rf-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.rf-stat-claimed .rf-stat-value {
    color: #f7d070;
}

.rf-stat-unclaimed .rf-stat-value {
    color: #8892b0;
}

.rf-stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #a0aec0;
    margin-top: 5px;
}

.rf-progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.rf-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #d49b29, #f7d070);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* Tabs & Controls Bar */
.rf-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.rf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.rf-tab-item {
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: #b0bec5;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
}

.rf-tab-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.rf-tab-item.active {
    background: #d49b29;
    color: #121417;
    font-weight: 700;
    border-color: #f7d070;
    box-shadow: 0 2px 6px rgba(212, 155, 41, 0.35);
}

.rf-search-box {
    flex: 1;
    min-width: 240px;
    max-width: 380px;
}

.rf-input {
    width: 100%;
    box-sizing: border-box;
    background: #14181f;
    border: 1px solid #2d3748;
    color: #e2e8f0;
    padding: 7px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.rf-input:focus {
    outline: none;
    border-color: #f7d070;
    box-shadow: 0 0 5px rgba(247, 208, 112, 0.3);
}

/* Achievement Card List */
.rf-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rf-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #181d24;
    border-radius: 6px;
    border: 1px solid #2a313d;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.rf-card:hover {
    border-color: #3f4a5c;
    background: #1d232c;
}

.rf-card-claimed {
    border-left: 4px solid #f7d070;
}

.rf-card-unclaimed {
    border-left: 4px solid #4a5568;
    opacity: 0.75;
}

.rf-card-unclaimed:hover {
    opacity: 0.95;
}

/* Icon */
.rf-icon-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.rf-icon-img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1px solid #000;
    box-shadow: inset 0 0 2px #fff, 0 2px 5px rgba(0,0,0,0.5);
    display: block;
}

.rf-card-claimed .rf-icon-img {
    border: 2px solid #e5a93b;
    box-shadow: 0 0 6px rgba(229, 169, 59, 0.4);
}

.rf-card-unclaimed .rf-icon-img {
    filter: grayscale(85%);
    border: 1px solid #4a5568;
}

.rf-badge-star {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #d49b29;
    color: #121417;
    font-size: 10px;
    line-height: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 0 3px #000;
}

/* Info Details */
.rf-info-wrapper {
    flex: 1;
    min-width: 220px;
}

.rf-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.rf-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f7d070;
}

.rf-card-unclaimed .rf-card-title {
    color: #cbd5e1;
}

.rf-category-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #2d3748;
    color: #a0aec0;
}

.rf-tier-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
}

.rf-tier-cata  { background: #b45309; color: #fef3c7; border: 1px solid rgba(245, 158, 11, 0.4); }
.rf-tier-wotlk { background: #0369a1; color: #e0f2fe; border: 1px solid rgba(56, 189, 248, 0.4); }

.rf-cat-level      { background: #7c2d12; color: #fdba74; }
.rf-cat-class      { background: #1e3a8a; color: #93c5fd; }
.rf-cat-profession { background: #065f46; color: #6ee7b7; }
.rf-cat-raid       { background: #581c87; color: #d8b4fe; }
.rf-cat-guild      { background: #831843; color: #fbcfe8; }

.rf-card-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.35;
}

/* Earner / Winner Column */
.rf-earner-wrapper {
    flex-shrink: 0;
    min-width: 220px;
    text-align: right;
}

.rf-char-primary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 3px;
}

.rf-stat-icon {
    width: 18px;
    height: 18px;
    border-radius: 2px;
    vertical-align: middle;
}

.rf-char-name {
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.rf-char-name:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.rf-extra-earners {
    font-size: 0.75rem;
    background: #334155;
    color: #f1f5f9;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

.rf-char-guild, .rf-guild-name {
    font-size: 0.82rem;
    color: #38bdf8;
    font-style: italic;
    margin-bottom: 2px;
}

.rf-guild-leader {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.rf-guild-leader a {
    color: #e2e8f0;
    text-decoration: none;
}

.rf-guild-leader a:hover {
    text-decoration: underline;
}

.rf-winner-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #e5a93b;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.rf-date {
    font-size: 0.78rem;
    color: #64748b;
}

.rf-date-icon {
    font-size: 0.75rem;
}

/* Unclaimed State */
.rf-unclaimed-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.rf-badge-unclaimed {
    background: #334155;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rf-unclaimed-text {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

/* Class Colors */
.rf-class-1  { color: #C69B6D !important; } /* Warrior */
.rf-class-2  { color: #F48CBA !important; } /* Paladin */
.rf-class-3  { color: #AAD372 !important; } /* Hunter */
.rf-class-4  { color: #FFF468 !important; } /* Rogue */
.rf-class-5  { color: #FFFFFF !important; } /* Priest */
.rf-class-6  { color: #C41E3A !important; } /* Death Knight */
.rf-class-7  { color: #0070DD !important; } /* Shaman */
.rf-class-8  { color: #3FC7EB !important; } /* Mage */
.rf-class-9  { color: #8788EE !important; } /* Warlock */
.rf-class-11 { color: #FF7C0A !important; } /* Druid */

/* Alerts & Empty State */
.rf-alert {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.rf-alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.rf-alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.rf-no-results {
    text-align: center;
    padding: 30px;
    background: #14181f;
    border-radius: 6px;
    color: #94a3b8;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .rf-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .rf-icon-wrapper {
        margin-bottom: -5px;
    }

    .rf-earner-wrapper {
        width: 100%;
        text-align: left;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 8px;
    }

    .rf-char-primary {
        justify-content: flex-start;
    }

    .rf-unclaimed-wrapper {
        align-items: flex-start;
    }

    .rf-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .rf-search-box {
        max-width: 100%;
    }
}
