/**
 * Profile Boost CSS - Phase 3 Sponsorship System
 * Based on UXLEAD_PROFILE_BOOST_RESPONSE.md specifications
 *
 * @author FEDEV (Claude Code)
 * @date 2026-01-25
 */

/* =============================================
   CSS VARIABLES
   ============================================= */

:root {
    /* Boost Badge Colors */
    --boost-gold: #F59E0B;
    --boost-gold-light: #FEF3C7;
    --boost-gold-dark: #92400E;
    --boost-gold-gradient: linear-gradient(135deg, #FCD34D, #F59E0B);

    /* Boost Card Highlight */
    --boost-card-bg: linear-gradient(135deg, #FFFBEB 0%, #FFFFFF 100%);
    --boost-card-border: 2px solid #F59E0B;
    --boost-card-shadow: 0 0 12px rgba(245, 158, 11, 0.15);

    /* Boost Tiers */
    --boost-bronze: #CD7F32;
    --boost-bronze-light: #FFF8F0;
    --boost-silver: #9CA3AF;
    --boost-silver-light: #F5F5F5;
    --boost-gold-tier: #FFD700;
}

/* Tier-specific variables */
.boosted.tier-gold {
    --boost-primary: #FFD700;
    --boost-primary-light: #FFFBEB;
    --boost-primary-dark: #92400E;
}

.boosted.tier-silver {
    --boost-primary: #9CA3AF;
    --boost-primary-light: #F5F5F5;
    --boost-primary-dark: #4B5563;
}

.boosted.tier-bronze {
    --boost-primary: #CD7F32;
    --boost-primary-light: #FFF8F0;
    --boost-primary-dark: #8B5A2B;
}

/* =============================================
   BOOST DISCOVERY WIDGET (Dashboard)
   ============================================= */

.boost-discovery-widget {
    background: var(--boost-card-bg);
    border: var(--boost-card-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--boost-card-shadow);
}

.boost-discovery-widget .sponsored-ribbon {
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--boost-gold-gradient);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 40px;
    transform: rotate(45deg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.boost-discovery-widget .widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.boost-discovery-widget .widget-header .sponsor-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
    border: 1px solid #E5E7EB;
}

.boost-discovery-widget .widget-header .sponsor-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--boost-gold);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.boost-discovery-widget .widget-header .sponsor-info {
    flex: 1;
}

.boost-discovery-widget .widget-header .sponsored-by {
    font-size: 12px;
    color: #6B7280;
}

.boost-discovery-widget .widget-header .sponsor-name {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
}

.boost-discovery-widget .widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 12px 0;
}

.boost-discovery-widget .widget-description {
    font-size: 14px;
    color: #4B5563;
    margin-bottom: 16px;
    line-height: 1.5;
}

.boost-discovery-widget .benefit-box {
    background: #fff;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.boost-discovery-widget .benefit-box .benefit-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.boost-discovery-widget .benefit-box .benefit-icon {
    font-size: 20px;
}

.boost-discovery-widget .benefit-box .benefit-tier {
    font-weight: 600;
    color: var(--boost-gold-dark);
}

.boost-discovery-widget .benefit-box .benefit-duration {
    font-size: 13px;
    color: #6B7280;
}

.boost-discovery-widget .benefit-box .benefit-value {
    font-size: 13px;
    color: #059669;
    font-weight: 500;
}

.boost-discovery-widget .widget-actions {
    display: flex;
    gap: 10px;
}

.boost-discovery-widget .btn-claim-boost {
    flex: 1;
    background: var(--boost-gold-gradient);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.boost-discovery-widget .btn-claim-boost:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.boost-discovery-widget .btn-dismiss {
    background: transparent;
    color: #6B7280;
    border: 1px solid #D1D5DB;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.boost-discovery-widget .btn-dismiss:hover {
    background: #F3F4F6;
    color: #374151;
}

/* =============================================
   ACTIVE BOOST WIDGET (Dashboard)
   ============================================= */

.boost-active-widget {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border: 2px solid #10B981;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.boost-active-widget .widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.boost-active-widget .widget-header .rocket-icon {
    font-size: 24px;
}

.boost-active-widget .widget-header .title {
    font-size: 16px;
    font-weight: 700;
    color: #065F46;
}

.boost-active-widget .status-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.boost-active-widget .countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #047857;
}

.boost-active-widget .countdown .days {
    font-weight: 700;
    font-size: 18px;
}

.boost-active-widget .sponsor-credit {
    font-size: 13px;
    color: #065F46;
    display: flex;
    align-items: center;
    gap: 6px;
}

.boost-active-widget .sponsor-credit img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Boost Impact Card */
.boost-impact-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.boost-impact-card .impact-title {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.boost-impact-card .impact-stats {
    display: flex;
    gap: 24px;
}

.boost-impact-card .impact-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.boost-impact-card .impact-stat .stat-icon {
    font-size: 16px;
    color: #10B981;
}

.boost-impact-card .impact-stat .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1F2937;
}

.boost-impact-card .impact-stat .stat-label {
    font-size: 12px;
    color: #6B7280;
}

.boost-impact-card .impact-stat .stat-change {
    font-size: 11px;
    color: #10B981;
    font-weight: 500;
}

/* =============================================
   LIMIT REACHED WIDGET
   ============================================= */

.boost-limit-widget {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.boost-limit-widget .widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.boost-limit-widget .widget-header .icon {
    font-size: 20px;
    color: #9CA3AF;
}

.boost-limit-widget .widget-header .title {
    font-size: 16px;
    font-weight: 600;
    color: #4B5563;
}

.boost-limit-widget .message {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 12px;
}

.boost-limit-widget .reset-info {
    font-size: 13px;
    color: #9CA3AF;
}

.boost-limit-widget .btn-view-history {
    margin-top: 12px;
    background: transparent;
    color: var(--boost-gold);
    border: 1px solid var(--boost-gold);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.boost-limit-widget .btn-view-history:hover {
    background: var(--boost-gold-light);
}

/* =============================================
   FEATURED FREELANCER BADGE
   ============================================= */

.featured-freelancer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: var(--boost-gold-dark);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.featured-freelancer-badge i {
    font-size: 10px;
}

.featured-freelancer-badge.badge-small {
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 10px;
}

.featured-freelancer-badge.badge-large {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 14px;
}

/* Tier variants */
.featured-freelancer-badge.tier-gold {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: #92400E;
}

.featured-freelancer-badge.tier-silver {
    background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
    color: #4B5563;
}

.featured-freelancer-badge.tier-bronze {
    background: linear-gradient(135deg, #FFF8F0, #FEEBC8);
    color: #8B5A2B;
}

/* Profile header boost badge */
.profile-boost-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    color: #047857;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.profile-boost-badge .rocket {
    font-size: 14px;
}

.profile-boost-badge .days-left {
    font-weight: 600;
}

/* =============================================
   FREELANCER CARD - FEATURED STYLING
   ============================================= */

.freelancer-card.featured {
    border: 2px solid var(--boost-gold);
    box-shadow: var(--boost-card-shadow);
    position: relative;
}

.freelancer-card.featured .featured-header {
    background: linear-gradient(90deg, #FEF3C7, #FFFFFF);
    padding: 8px 16px;
    margin: -16px -16px 16px;
    border-radius: 10px 10px 0 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--boost-gold-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.freelancer-card.featured .featured-header::before {
    content: '\f005'; /* Font Awesome star */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Freelancer recommendation card */
.freelancer-recommendation-card.boosted {
    background: var(--boost-card-bg);
    border: var(--boost-card-border);
    position: relative;
}

.freelancer-recommendation-card.boosted::before {
    content: '\2b50';
    position: absolute;
    top: -8px;
    right: 12px;
    background: var(--boost-gold-gradient);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.boost-sponsor-credit {
    font-size: 11px;
    color: var(--boost-gold-dark);
    margin-top: 8px;
    font-style: italic;
}

/* =============================================
   BID CARD - FEATURED BADGE
   ============================================= */

.bid-card .featured-freelancer-badge {
    margin-left: 8px;
}

.bid-card .featured-freelancer-badge[title] {
    cursor: help;
}

/* =============================================
   SEARCH RESULTS - FEATURED FREELANCER
   ============================================= */

.search-freelancer-card.featured {
    border: 2px solid var(--boost-gold);
    box-shadow: var(--boost-card-shadow);
}

.search-freelancer-card.featured .card-header-featured {
    background: linear-gradient(90deg, #FEF3C7, transparent);
    padding: 6px 12px;
    margin: -12px -12px 12px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--boost-gold-dark);
}

/* Featured Freelancer Card - project_bid_listing style (search results) */
.project_bid_listing.featured-freelancer-card {
    border: 2px solid var(--boost-gold) !important;
    box-shadow: var(--boost-card-shadow) !important;
    background: var(--boost-card-bg) !important;
    position: relative;
    overflow: hidden;
}

.project_bid_listing.featured-freelancer-card.tier-gold {
    border-color: #FFD700 !important;
}

.project_bid_listing.featured-freelancer-card.tier-silver {
    border-color: #9CA3AF !important;
}

.project_bid_listing.featured-freelancer-card.tier-bronze {
    border-color: #CD7F32 !important;
}

.project_bid_listing.featured-freelancer-card .card-header-featured {
    background: linear-gradient(90deg, #FEF3C7, transparent);
    padding: 8px 16px;
    margin: -15px -15px 15px -15px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--boost-gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project_bid_listing.featured-freelancer-card .card-header-featured i {
    color: var(--boost-gold);
}

/* Tier-specific header backgrounds */
.project_bid_listing.featured-freelancer-card.tier-gold .card-header-featured {
    background: linear-gradient(90deg, #FEF3C7, transparent);
}

.project_bid_listing.featured-freelancer-card.tier-silver .card-header-featured {
    background: linear-gradient(90deg, #F3F4F6, transparent);
    color: #4B5563;
}

.project_bid_listing.featured-freelancer-card.tier-silver .card-header-featured i {
    color: #9CA3AF;
}

.project_bid_listing.featured-freelancer-card.tier-bronze .card-header-featured {
    background: linear-gradient(90deg, #FFF8F0, transparent);
    color: #8B5A2B;
}

.project_bid_listing.featured-freelancer-card.tier-bronze .card-header-featured i {
    color: #CD7F32;
}

/* =============================================
   SPONSORSHIP HISTORY PAGE
   ============================================= */

.sponsorship-history-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.sponsorship-history-page .page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 24px;
}

.sponsorship-history-page .section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sponsorship-history-page .section-title {
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.sponsorship-history-page .benefit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 12px;
}

.sponsorship-history-page .benefit-item.active {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    border: 1px solid #10B981;
}

.sponsorship-history-page .benefit-item .benefit-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sponsorship-history-page .benefit-item .benefit-icon {
    font-size: 24px;
}

.sponsorship-history-page .benefit-item .benefit-details h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 4px 0;
}

.sponsorship-history-page .benefit-item .benefit-details p {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
}

.sponsorship-history-page .benefit-item .benefit-status {
    text-align: right;
}

.sponsorship-history-page .benefit-item .benefit-status .status-label {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.sponsorship-history-page .benefit-item .benefit-status .status-label.active {
    background: #D1FAE5;
    color: #047857;
}

.sponsorship-history-page .benefit-item .benefit-status .status-label.completed {
    background: #E5E7EB;
    color: #4B5563;
}

.sponsorship-history-page .benefit-item .benefit-status .date {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 4px;
}

/* Yearly Summary */
.sponsorship-history-page .yearly-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.sponsorship-history-page .summary-item {
    background: #F9FAFB;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.sponsorship-history-page .summary-item .summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
}

.sponsorship-history-page .summary-item .summary-label {
    font-size: 13px;
    color: #6B7280;
    margin-top: 4px;
}

/* =============================================
   RESPONSIVE STYLES
   ============================================= */

@media (max-width: 768px) {
    .boost-discovery-widget {
        padding: 16px;
    }

    .boost-discovery-widget .widget-actions {
        flex-direction: column;
    }

    .boost-discovery-widget .btn-claim-boost,
    .boost-discovery-widget .btn-dismiss {
        width: 100%;
    }

    .boost-impact-card .impact-stats {
        flex-direction: column;
        gap: 12px;
    }

    .sponsorship-history-page .benefit-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .sponsorship-history-page .benefit-item .benefit-status {
        text-align: left;
    }
}

/* =============================================
   RTL SUPPORT
   ============================================= */

[dir="rtl"] .boost-discovery-widget .sponsored-ribbon {
    right: auto;
    left: -30px;
    transform: rotate(-45deg);
}

[dir="rtl"] .boost-discovery-widget .widget-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .featured-freelancer-badge {
    flex-direction: row-reverse;
}

[dir="rtl"] .bid-card .featured-freelancer-badge {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .boost-active-widget .countdown,
[dir="rtl"] .boost-active-widget .sponsor-credit {
    flex-direction: row-reverse;
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes boost-pulse {
    0%, 100% { box-shadow: var(--boost-card-shadow); }
    50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.25); }
}

.boost-discovery-widget.animate-pulse {
    animation: boost-pulse 2s ease-in-out infinite;
}

.boost-discovery-widget.claiming {
    opacity: 0.7;
    pointer-events: none;
}

.boost-discovery-widget.claimed {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border-color: #10B981;
}

.boost-discovery-widget.dismissed {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}
