/* Base styles for the entire page */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Heading focus outline removal */
h1:focus {
    outline: none;
}

/* Anchor and button link styles */
a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* Focus state styles for buttons, form controls, and links */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Content padding for layout */
.content {
    padding-top: 1.1rem;
}

/* Form validation styles */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Error message UI styles */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Blazor error boundary styles */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,[...] /* Base64 SVG removed for brevity */ );
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* Loading progress indicator */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

/* Loading progress text */
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Code block text color */
code {
    color: #c02d76;
}

/* Placeholder styling */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Narrow header styles */
.narrow-header {
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
}

    .narrow-header a {
        font-size: 0.75rem !important;
        line-height: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

/* Footer styles */
footer {
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    margin-top: 20px;
}

    footer a {
        color: #007BFF;
        text-decoration: none;
    }

        footer a:hover {
            text-decoration: underline;
        }

/* Weather page styles */
.weather-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    line-height: 1.5;
    color: #333;
}

.weather-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #004085;
}

.forecast-list {
    margin-top: 1rem;
}

/* Individual forecast item container */
.forecast-item {
    display: flex;
    align-items: center; /* Ensures icons and text align vertically */
    margin-bottom: 1rem;
    font-size: 0.95rem; /* Slightly smaller font size */
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* Weather icons */
.forecast-icon {
    width: 40px; /* Icon size */
    height: 40px;
    margin-right: 1rem; /* Space between icon and text */
}

/* Forecast content styling */
.forecast-content {
    flex: 1;
}

/* Highlighted day/title */
.forecast-period {
    font-size: 1rem;
    font-weight: bold;
    color: #004085;
    margin-bottom: 0.2rem;
    background-color: #eef2f7; /* Light background for emphasis */
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase; /* Makes it more distinct */
}

/* Forecast details text */
.forecast-details {
    font-size: 0.9rem;
    color: #555;
}

/* Cache timestamp styling */
.cache-timestamp {
    color: #c0c0c0;
    font-size: 0.65rem;
    text-align: center;
    margin-top: 0.25rem;
    font-style: italic;
}

/*Tech stack*/
/* General Layout */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.tech-card {
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .tech-card:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

.tech-logo {
    max-width: 100px;
    margin-bottom: 12px;
}

.tech-category {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.9em;
    color: #555;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Category Filters */
.category-filters {
    margin-bottom: 20px;
    text-align: center;
}

.filter-button {
    background-color: #0078d7;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

    .filter-button:hover {
        background-color: #005a9e;
    }

/* Loading Spinner */
.loading-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #0078d7;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
