/* === STILI PER PASSI GIORNALIERI === */

.steps-section {
    margin-bottom: 30px;
}

.steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.steps-header h2 {
    margin: 0;
    color: #4a5568;
    font-size: 24px;
}

.steps-toggle-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.steps-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-primary-200);
}

.steps-content {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.steps-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-600));
    animation: shimmer 3s infinite;
}

.steps-content.hidden {
    display: none;
}

/* Form inserimento passi */
.steps-input-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.steps-input-section h3 {
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
    font-weight: 700;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.steps-input-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.steps-input-form input[type="date"] {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.steps-input-form input[type="number"] {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    width: 150px;
    transition: border-color 0.3s ease;
}

.steps-input-form input:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px var(--color-primary-100);
}

.steps-input-form button {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.steps-input-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

/* Statistiche passi */
.steps-stats-section {
    margin-bottom: 25px;
}

.steps-stats-section h3 {
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
    font-weight: 700;
}

.steps-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.steps-stats-grid-4col {
    grid-template-columns: repeat(4, 1fr);
}

.steps-stat-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.steps-stat-card:hover {
    border-color: var(--color-primary-500);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-primary-200);
}

.steps-stat-card h4 {
    margin: 0 0 8px 0;
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.steps-stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 3px;
}

.steps-stat-card .stat-unit {
    font-size: 0.9rem;
    color: #718096;
}

.steps-stat-card .stat-total {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 4px;
    font-weight: normal;
}

.steps-stat-card.goal-reached .stat-value {
    color: #48bb78;
}

.steps-stat-card.goal-exceeded .stat-value {
    color: #38a169;
}

/* Grafico passi */
.steps-chart-section {
    margin-bottom: 25px;
}

.steps-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.steps-chart-header h3 {
    margin: 0;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
    font-weight: 700;
}

.steps-chart-granularity-wrapper {
    position: relative;
}

.steps-chart-granularity-bubble {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.steps-chart-granularity-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.steps-chart-granularity-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: var(--z-overlay);
    min-width: 200px;
    overflow: hidden;
    margin-top: 5px;
}

.steps-chart-granularity-dropdown.hidden {
    display: none;
}

.steps-chart-granularity-dropdown .dropdown-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #2d3748;
}

.steps-chart-granularity-dropdown .dropdown-option:hover {
    background-color: #f7fafc;
}

.steps-chart-granularity-dropdown .dropdown-option:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.steps-chart-granularity-bubble.active .dropdown-arrow {
    transform: rotate(180deg);
}

.steps-chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    height: 400px;
    position: relative;
}

/* Barra progresso goal settimanale */
.steps-weekly-progress-section {
    margin-bottom: 25px;
}

.steps-weekly-progress-section h3 {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.weekly-progress-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.weekly-progress-info {
    margin-bottom: 15px;
    text-align: center;
}

.weekly-progress-text {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 500;
}

.weekly-progress-bar {
    position: relative;
    height: 30px;
    background: #f7fafc;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    overflow: visible;
}

.weekly-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    border-radius: 13px;
    transition: width 0.8s ease;
    position: relative;
}

.weekly-progress-walker {
    position: absolute;
    top: -8px;
    font-size: 2rem;
    transform: translateX(-50%);
    transition: left 0.8s ease;
    z-index: var(--z-dropdown);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Insight passi */
.steps-insights-section {
    margin-bottom: 25px;
}

.steps-insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.steps-insights-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.steps-insights-toggle-btn {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.steps-insights-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--color-primary-200);
}

.steps-insights-container {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(237, 242, 247, 0.9));
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.steps-insight-item {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 252, 0.95));
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 6px solid var(--color-primary-500);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.steps-insight-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: inherit;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.steps-insight-item:hover {
    transform: translateY(-4px) translateX(4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.steps-insight-item:hover::before {
    width: 8px;
}

.steps-insight-item:last-child {
    margin-bottom: 0;
}

.steps-insight-item h4 {
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
}

.steps-insight-item p {
    margin: 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
}

.steps-insight-item.positive {
    border-left-color: #48bb78;
}

.steps-insight-item.positive::before {
    background: linear-gradient(180deg, #48bb78 0%, #38a169 100%);
}

.steps-insight-item.warning {
    border-left-color: #ed8936;
}

.steps-insight-item.warning::before {
    background: linear-gradient(180deg, #ed8936 0%, #dd6b20 100%);
}

.steps-insight-item.negative {
    border-left-color: #f56565;
}

.steps-insight-item.negative::before {
    background: linear-gradient(180deg, #f56565 0%, #e53e3e 100%);
}

.steps-insight-item.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.steps-insight-item.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    background: #f8fafc;
}

.click-hint {
    font-size: 0.8rem;
    color: var(--color-primary-500);
    font-style: italic;
    margin-top: 5px;
    display: block;
    text-align: center;
}

/* Calendario mensile */
.steps-calendar-section {
    margin-bottom: 25px;
}

.steps-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
    flex-wrap: wrap;
}

.steps-calendar-section h3 {
    margin: 0;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
    font-weight: 700;
}

.steps-month-selector {
    padding: 10px 18px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 252, 0.9));
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.steps-month-selector:hover {
    border-color: var(--color-primary-500);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-primary-200);
}

.steps-month-selector:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 4px var(--color-primary-100);
    transform: translateY(-2px);
}

.steps-calendar-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 252, 0.9));
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 320px;
    margin: 0 auto;
}

.calendar-header {
    text-align: center;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 40px);
    gap: 6px;
    justify-content: center;
}

.calendar-day-header {
    text-align: center;
    padding: 6px 2px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 40px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Giorni con dati - colori applicati via inline style dal JS */
.calendar-day:not(.future):not(.no-data):not(.today) {
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.calendar-day:hover:not(.future) {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
    z-index: var(--z-dropdown);
}

/* Giorni futuri */
.calendar-day.future {
    background: rgba(255, 255, 255, 0.4) !important;
    color: #cbd5e0 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    border: 1px solid rgba(203, 213, 224, 0.3);
}

/* Giorni senza dati */
.calendar-day.no-data {
    background: rgba(255, 255, 255, 0.6) !important;
    color: #a0aec0 !important;
    border: 1px dashed rgba(160, 174, 192, 0.4);
}

/* Giorno corrente */
.calendar-day.today {
    font-weight: 800;
    border: 3px solid var(--color-primary-500) !important;
    box-shadow: 0 0 0 4px var(--color-primary-100), 0 4px 12px var(--color-primary-200) !important;
    animation: todayPulse 2s ease-in-out infinite;
}

@keyframes todayPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px var(--color-primary-100), 0 4px 12px var(--color-primary-200);
    }
    50% {
        box-shadow: 0 0 0 6px var(--color-primary-200), 0 6px 16px var(--color-primary-300);
    }
}

/* Colori per successo (obiettivo raggiunto) */
.calendar-day.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
    color: white !important;
    border: none;
}

/* Colori per parziale (vicino all'obiettivo) */
.calendar-day.partial {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%) !important;
    color: white !important;
    border: none;
}

/* Colori per fallito (lontano dall'obiettivo) */
.calendar-day.failed {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%) !important;
    color: white !important;
    border: none;
}



/* Storico passi */
.steps-history-section h3 {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.steps-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.steps-history-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.steps-history-toggle-btn {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.steps-history-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--color-primary-200);
}

.steps-history-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    max-height: 400px;
    overflow-y: auto;
}

.steps-history-content::-webkit-scrollbar {
    width: 8px;
}

.steps-history-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.steps-history-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    border-radius: 10px;
}

.steps-history-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
}

.steps-history-content.hidden {
    display: none;
}

.steps-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.steps-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.steps-history-item:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.steps-history-item-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.steps-history-date {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

.steps-history-change {
    font-size: 0.85rem;
    font-weight: 500;
}

.steps-history-change.positive {
    color: #48bb78;
}

.steps-history-change.negative {
    color: #f56565;
}

.steps-history-change.neutral {
    color: #718096;
}

.steps-history-item-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.steps-history-steps {
    font-weight: bold;
    color: #2d3748;
    font-size: 1.1rem;
}

/* Contenitore azioni storico */
.steps-history-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.steps-edit-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
    color: #3B82F6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps-edit-btn:hover {
    background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
    opacity: 1;
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.steps-delete-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
    color: #f56565;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps-delete-btn:hover {
    background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
    opacity: 1;
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

/* Goal indicator */
.steps-goal-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.steps-goal-indicator.reached {
    background: #c6f6d5;
    color: #22543d;
}

.steps-goal-indicator.exceeded {
    background: #bee3f8;
    color: #2a4365;
}

.steps-goal-indicator.not-reached {
    background: #fed7d7;
    color: #742a2a;
}

/* Responsive */
@media (max-width: 768px) {
    .steps-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .steps-input-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .steps-input-form input[type="number"] {
        width: 100%;
    }
    
    .steps-stats-grid {
        grid-template-columns: 1fr;
    }

    .steps-stats-grid-4col {
        grid-template-columns: 1fr;
    }
    
    .steps-chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .steps-chart-granularity-wrapper {
        align-self: center;
    }
    
    .steps-chart-granularity-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .steps-insights-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .weekly-progress-text {
        font-size: 0.9rem;
    }
    
    .weekly-progress-walker {
        font-size: 1.5rem;
        top: -5px;
    }
    
    .steps-calendar-header {
        flex-direction: column;
        align-items: stretch;
    }

    .steps-month-selector {
        width: 100%;
    }

    .steps-calendar-container {
        max-width: 300px;
        padding: 15px;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 38px);
        gap: 3px;
    }
    
    .calendar-day {
        width: 38px;
        height: 38px;
        font-size: 0.75rem;
    }
    
    .calendar-day-header {
        width: 38px;
        height: 26px;
        font-size: 0.65rem;
        padding: 3px 1px;
    }
    
    .steps-history-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .steps-history-buttons {
        justify-content: center;
    }
    
    .steps-history-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .steps-history-item-right {
        justify-content: space-between;
    }
    
    .steps-history-actions {
        gap: 6px;
    }
    
    .steps-edit-btn,
    .steps-delete-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Animazioni */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.steps-success-message {
    animation: slideIn 0.3s ease-out;
}

/* Icone per i passi */
.steps-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.steps-stat-card .steps-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

/* Box goal cliccabile */
.steps-stat-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.steps-stat-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--color-primary-200);
    border-color: var(--color-primary-500);
}

.goal-hint {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.steps-stat-card.clickable:hover .goal-hint {
    opacity: 1;
}/* Stili
 per il goal info nel box passi di oggi */
.goal-info {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.goal-text {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
}

.goal-percentage {
    font-size: 0.75rem;
    color: #a0aec0;
    font-weight: normal;
}

/* Colori dinamici per la percentuale */
.goal-percentage.low {
    color: #f56565;
}

.goal-percentage.medium {
    color: #ed8936;
}

.goal-percentage.high {
    color: #48bb78;
}

.goal-percentage.exceeded {
    color: #38a169;
    font-weight: 600;
}

/* Stili per il box obiettivo suggerito */
#suggested-goal-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
}

#suggested-goal-card .stat-value {
    color: var(--color-primary-500);
}

#suggested-goal-card .stat-unit {
    font-size: 0.8rem;
    color: #4a5568;
    font-style: italic;
}

/* Stili per la percentuale nell'obiettivo suggerito */
#suggested-goal-description {
    font-size: 0.75rem;
    font-weight: normal;
    margin-top: 4px;
}

#suggested-goal-description.low {
    color: #f56565;
}

#suggested-goal-description.medium {
    color: #ed8936;
}

#suggested-goal-description.high {
    color: #48bb78;
}

#suggested-goal-description.exceeded {
    color: #38a169;
    font-weight: 600;
}

/* Hover effect per il box passi di oggi cliccabile */
#current-steps-card:hover .goal-info {
    color: var(--color-primary-500);
}

#current-steps-card:hover .goal-text {
    color: var(--color-primary-500);
}

#current-steps-card:hover .goal-percentage {
    color: var(--color-primary-600);
}

/* Legenda del grafico passi */
.steps-chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #4a5568;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-line {
    width: 20px;
    height: 1px;
    margin: 0 2px;
}

@media (max-width: 768px) {
    .steps-chart-legend {
        gap: 15px;
    }
    
    .legend-item {
        font-size: 0.75rem;
    }
    
    .legend-color {
        width: 10px;
        height: 10px;
    }
    
    .legend-line {
        width: 16px;
    }
}
/* Icona personalizzata per il confronto con la Terra */
.earth-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    object-fit: contain;
}

.steps-insight-item h4 .earth-icon {
    display: inline-block;
    flex-shrink: 0;
}

/* Immagine grande sotto il testo */
.earth-icon-large {
    display: block;
    width: 120px;
    height: 120px;
    margin: 15px auto 0;
    object-fit: contain;
}

/* Badge traguardi a forma di scudo */
.milestone-badge {
    display: inline-block;
    width: 80px;
    height: 90px;
    margin: 15px auto 0;
    position: relative;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 70px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.milestone-badge.achieved {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    animation: badgePulse 2s ease-in-out infinite;
}

.milestone-badge.locked {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    color: #757575;
    opacity: 0.7;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Immagine cronometro */
.cronometro-icon {
    display: block;
    width: 80px;
    height: 80px;
    margin: 15px auto 0;
    object-fit: contain;
}
