/* General body styling */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 20px;
    background-color: #f9f9f9;
    color: #333;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Ensure Consistent Padding for All Stock Tables */
.stock-table th, .stock-table td {
    padding: 4px 8px;
    text-align: center;
    border: 1px solid #ddd;
}

/* Keep Day Chart Images Compact */
.day-chart {
    max-height: 50px;
    width: auto;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Headings */
h1 {
    text-align: center;
    margin-bottom: 20px;
}

/* Default images (Performance Charts) */
img {
    /max-width: 600px;
    width: 30%; /* Default width for desktop */
    height: auto;
    display: block;
    margin: 10px auto;
}

/* Day Chart size in table cells */
.day-chart {
    max-width: 100px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.flag {
    font-size: 14px;
    font-weight: bold;
    color: #666;
}

/* Larger Performance Charts */
/* Default image size for desktop */
.enlargeable-keep {
    max-width: 600px;
    height: auto;
    display: block;
    margin: 10px auto;
}

/* Enlarged Image (Full Screen Lightbox) */
.enlargeable {
    cursor: pointer;
    transition: transform 0.3s ease;
}

#overlay img {
    width: auto;
    height: auto;
    max-width: 90vw;  /* Limit to 90% of viewport width */
    max-height: 90vh; /* Limit to 90% of viewport height */
    margin: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Flex Container for Performance Charts */
.performance-chart-container {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to the next row if needed */
    gap: 10px;       /* Space between items */
    justify-content: center; /* Center items in the row */
    padding: 10px 0;
}

/* Individual Performance Chart */
.performance-chart {
    flex: 1 1 calc(33.33% - 20px); /* 3 per row on desktop */
    max-width: calc(33.33% - 20px);
    box-sizing: border-box;
    text-align: center;
}

/* Image Styling */
.performance-chart img {
    width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments for Smaller Screens */
@media screen and (max-width: 768px) {
    .performance-chart {
        flex: 1 1 calc(50% - 20px); /* 2 per row on tablet */
        max-width: calc(50% - 20px);
    }
}

@media screen and (max-width: 480px) {
    .performance-chart {
        flex: 1 1 100%; /* 1 per row on mobile */
        max-width: 100%;
    }
}


/* Ensure only the text inside the cell is left-aligned */
.left-align {
    display: inline-block;
    text-align: left;
    width: 100%;
}

/* Navigation Arrows */
/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    user-select: none;
    z-index: 1100;
    padding: 10px;
}

.nav-arrow:first-of-type {
    left: 20px;
}

.nav-arrow:last-of-type {
    right: 20px;
}

/* Positive and Negative Styling */
.positive {
    color: green;
    font-weight: bold;
}

.negative {
    color: red;
    font-weight: bold;
}

/* Reusable Button Style */
.link-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #007bff;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin: 10px;
}

.link-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Compact table for sell prices */
.sell-table {
    width: 50%;         /* Set narrower width */
    margin: 20px auto;  /* Center the table */
    border-collapse: collapse;
    font-size: 14px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Optional subtle shadow */
}

.sell-table th, .sell-table td {
    padding: 6px 10px;  /* Reduced padding for a compact look */
    text-align: center;
    border: 1px solid #ddd;
}

.sell-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}

.sell-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.sell-table tr:hover {
    background-color: #f1f1f1;
}

/* Recommendation Color Coding */
.recommendation-strong-buy {
    color: darkgreen;
    font-weight: bold;
}

.recommendation-buy {
    color: forestgreen;
    font-weight: bold;
}

.recommendation-hold {
    color: orange;
    font-weight: bold;
}

.recommendation-sell {
    color: red;
    font-weight: bold;
}

.recommendation-no-data {
    color: grey;
    font-weight: bold;
}




/* Strava Button Style */
.strava-button {
    display: inline-block;
    align-items: center;
    vertical-align: middle;
    justify-content: center;
    width: 220px;
    height: 50px;
    background-color: #fc4c02; /* Strava orange */
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin: 10px;
    margin-right: 10px;
    margin-top: 0px;  /* 👈 adjust this up or down as needed */
    line-height: 1;
}

.strava-button:hover {
    background-color: #e64500;
    transform: translateY(-2px);
}

.strava-button img {
    height: 20px;
    margin-right: 10px;
    margin-top: 2px; /* adjust to align logo visually */
    vertical-align: middle;
}

.strava-button span {
    color: white;
    font-weight: bold;
    font-size: 14px;
    vertical-align: middle;
}


/* Strava Button Style if only logo */
/* Match overall size and layout of .link-button */
.strava-button.logo-only {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 220px;
    height: 45px;
    background-color: #fc4c02;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin: 10px;
    vertical-align: middle;
}

/* Hover effect consistent with other buttons */
.strava-button.logo-only:hover {
    background-color: #e64500;
    transform: translateY(-2px);
}

/* Logo styling: restrict size and center perfectly */
.strava-button.logo-only img {
    height: 20px;
    max-height: 80%;
    max-width: 80%;
    display: block;
}

/* Wrapper to force perfect centering */
.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Restrict and center the logo */
.logo-wrapper img {
    height: 40px;  /* or 30px */
    width: auto;
    display: block;
}