/* Home Screen Widget - Unified Horizontal Scroll Design */

/* Category Tabs */
.home-widget-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.home-widget-tab:hover {
    background: rgba(255, 255, 255, 0.25);
}

.home-widget-tab.active {
    background: rgba(255, 255, 255, 0.9);
    color: #059669;
    text-shadow: none;
}

.home-widget-tab.active svg {
    stroke: #059669;
}

.home-widget-tab svg {
    stroke: currentColor;
}

/* Horizontal Scroll Container */
.home-widget-scroll-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 8px 10px 8px;
    min-height: 100px;
}

.home-widget-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Widget Card Base - 70% width of container */
.home-widget-card {
    flex: 0 0 calc(70% - 6px);
    min-width: calc(70% - 6px);
    max-width: calc(70% - 6px);
    height: auto;
    min-height: 90px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.home-widget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.home-widget-card:active {
    transform: scale(0.98);
}

/* Card Category Badge */
.home-widget-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-widget-card-badge svg {
    width: 12px;
    height: 12px;
}

/* Event Card Styling */
.home-widget-card.event-card {
    border-left: 3px solid #0ea5e9;
}

.home-widget-card.event-card .home-widget-card-badge {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

/* Group Card Styling */
.home-widget-card.group-card {
    border-left: 3px solid #8b5cf6;
}

.home-widget-card.group-card .home-widget-card-badge {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

/* Progress Card Styling */
.home-widget-card.progress-card {
    border-left: 3px solid #10b981;
}

.home-widget-card.progress-card .home-widget-card-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Card Content */
.home-widget-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 3px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: 28px;
}

.home-widget-card-subtitle {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 3px;
    line-height: 1.2;
}

.home-widget-card-meta {
    font-size: 10px;
    color: #0ea5e9;
    font-weight: 500;
    margin-top: auto;
}

/* Progress Bar for Journey Progress Cards */
.home-widget-progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.home-widget-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.home-widget-progress-text {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
    margin-top: 6px;
}

/* Scroll Indicator Dots */
.home-widget-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.home-widget-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.home-widget-dot.active {
    background: rgba(255, 255, 255, 0.9);
    width: 18px;
    border-radius: 3px;
}

/* Empty State */
.home-widget-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.home-widget-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.home-widget-empty p {
    font-size: 13px;
    margin: 0;
}

.home-widget-empty .subtitle {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

/* Premium Gate Styling */
.home-widget-premium-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem 1rem 1rem;
    text-align: center;
    min-height: 90px;
}

.home-widget-premium-gate .premium-gate-icon {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.home-widget-premium-gate .premium-gate-icon svg {
    stroke: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

.home-widget-premium-gate h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fafafa;
    margin-bottom: 0.15rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.home-widget-premium-gate p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.upgrade-home-widget-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.upgrade-home-widget-btn:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.5);
}

.upgrade-home-widget-btn:active {
    transform: scale(0.98);
}

/* Hide tabs for non-premium */
#home-widget-tabs.hidden {
    display: none;
}

/* Legacy container hiding */
#home-events-activities.hidden,
#home-favorites-journeys.hidden {
    display: none !important;
}

/* Offer Card Styling */
.home-widget-card.offer-card {
    border-left: 3px solid #f59e0b;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(255, 255, 255, 0.95) 100%);
    padding: 12px 16px;
}

.home-widget-card.offer-card.expiring-soon {
    border-left-color: #ef4444;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% {
        border-left-color: #ef4444;
    }
    50% {
        border-left-color: #f97316;
    }
}

.home-widget-card.offer-card .home-widget-card-badge {
    background: rgba(251, 191, 36, 0.2);
    font-size: 16px;
}

.home-widget-card.offer-card .home-widget-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.offer-coupon-code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1e293b;
    background: rgba(251, 191, 36, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px dashed #f59e0b;
}

.offer-time-remaining {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

.offer-time-remaining.warning {
    color: #ef4444;
    font-weight: 700;
}
