/* Making Miles Initiative Styles */

.making-miles-dashboard {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 25px;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/* Statistics Grid */
.making-miles-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.making-miles-stat-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease-in-out;
}

.making-miles-stat-item:hover {
    transform: translateY(-5px);
}

.making-miles-icon {
    margin: 0 auto 15px;
    width: 50px;
    height: 50px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.making-miles-icon-distance {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>');
}

.making-miles-icon-money {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>');
}

.making-miles-icon-athletes {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>');
}

.making-miles-icon-activities {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>');
}

.making-miles-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.making-miles-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Activity Types */
.making-miles-activity-split {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.making-miles-activity-split h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.making-miles-activity-types {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.making-miles-activity-type {
    flex: 1;
    min-width: 150px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.making-miles-run {
    background-color: #e3f2fd;
}

.making-miles-ride {
    background-color: #f1f8e9;
}

.making-miles-activity-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.making-miles-activity-value {
    font-size: 24px;
    font-weight: 700;
}

/* Leaderboard */
.making-miles-leaderboard {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.making-miles-leaderboard h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.making-miles-leaderboard table {
    width: 100%;
    border-collapse: collapse;
}

.making-miles-leaderboard th,
.making-miles-leaderboard td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.making-miles-leaderboard th {
    font-weight: 600;
    color: #555;
    background-color: #f9f9f9;
}

.making-miles-leaderboard tr:last-child td {
    border-bottom: none;
}

.making-miles-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

/* Donation Info */
.making-miles-donation-info {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.making-miles-donation-info h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.making-miles-donation-rate p {
    font-size: 18px;
    font-weight: 600;
    color: #4caf50;
}

/* Footer */
.making-miles-footer {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin-top: 20px;
}

/* Individual display styles */
.making-miles-distance,
.making-miles-money {
    text-align: center;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.making-miles-distance .making-miles-value,
.making-miles-money .making-miles-value {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.making-miles-distance .making-miles-label,
.making-miles-money .making-miles-label {
    font-size: 16px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .making-miles-stats {
        grid-template-columns: 1fr;
    }
    
    .making-miles-activity-types {
        flex-direction: column;
    }
    
    .making-miles-value {
        font-size: 28px;
    }
    
    .making-miles-distance .making-miles-value,
    .making-miles-money .making-miles-value {
        font-size: 36px;
    }
}

/* Animation effects */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.making-miles-dashboard {
    animation: fadeIn 0.5s ease-out;
}

.making-miles-stat-item:nth-child(1) { animation: fadeIn 0.5s ease-out 0.1s both; }
.making-miles-stat-item:nth-child(2) { animation: fadeIn 0.5s ease-out 0.2s both; }
.making-miles-stat-item:nth-child(3) { animation: fadeIn 0.5s ease-out 0.3s both; }
.making-miles-stat-item:nth-child(4) { animation: fadeIn 0.5s ease-out 0.4s both; }
/* Connection page styles */
.making-miles-connect {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.making-miles-connect h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.making-miles-connect-button {
    margin: 30px 0;
    text-align: center;
}

.making-miles-connect-button .button {
    display: inline-block;
    background-color: #fc4c02; /* Strava orange */
    color: white;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.making-miles-connect-button .button:hover {
    background-color: #e34402;
}

.making-miles-privacy {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.making-miles-privacy h3 {
    font-size: 18px;
    color: #333;
}

.making-miles-success {
    padding: 20px;
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    margin-bottom: 20px;
    color: #2e7d32;
    font-weight: 600;
}

.making-miles-error {
    padding: 20px;
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    margin-bottom: 20px;
    color: #c62828;
    font-weight: 600;
}

/* Strava attribution styles */
.making-miles-strava-attribution {
    margin-top: 20px;
    text-align: center;
    clear: both;
}

.strava-compatible-logo {
    height: 30px;
    width: auto;
}

.making-miles-branding {
    margin: 30px 0;
    text-align: center;
}

/* "View on Strava" link styling as per guidelines */
.view-on-strava {
    color: #FC5200; /* Strava orange as required */
    font-weight: bold;
    text-decoration: none;
}

.view-on-strava:hover {
    text-decoration: underline;
}

/* Strava connect button */
.strava-connect-button {
    height: 48px;
    width: auto;
    transition: none; /* Remove any animations as per guidelines */
}

/* Prevent strava logos from appearing more prominently */
.making-miles-footer .making-miles-strava-attribution {
    margin-top: 20px;
    opacity: 0.9;
}

/* Ensure Strava attribution is distinct and separate */
.making-miles-strava-attribution {
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: 25px;
}

/* Container for Strava data must show linking */
.making-miles-dashboard,
.making-miles-leaderboard {
    position: relative;
}
/* Recent Activities */
.making-miles-recent-activities {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.making-miles-recent-activities h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.making-miles-activities-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.making-miles-activity {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: transform 0.2s;
}

.making-miles-activity:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.making-miles-activity-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.making-miles-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.making-miles-athlete-name {
    font-weight: 600;
    color: #333;
}

.making-miles-activity-details {
    display: flex;
    flex-direction: column;
}

.making-miles-activity-name {
    font-weight: 600;
    margin: 0 0 5px 0;
}

.making-miles-activity-info {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.making-miles-activity-type {
    background-color: #e3f2fd;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.making-miles-activity-type:contains("Ride") {
    background-color: #f1f8e9;
}

.view-on-strava {
    align-self: flex-start;
    margin-top: 5px;
}