/**
 * Snow Day Calculator Styles
 * 
 * This stylesheet is scoped to the snow day calculator elements
 * to prevent conflicts with WordPress theme styles.
 */

/* Container */
.snow-day-calculator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Title */
.snow-day-calculator-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

/* Location section */
.snow-day-location-container {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4285f4;
}

.snow-day-location-info p {
    margin-top: 0;
    margin-bottom: 15px;
    color: #555;
}

.snow-day-location-button {
    display: inline-flex;
    align-items: center;
    background-color: #4285f4;
    margin-bottom: 10px;
}

.snow-day-location-button:hover {
    background-color: #3367d6;
}

.location-icon, .refresh-icon {
    margin-right: 8px;
    font-size: 18px;
}

.current-location-display {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(66, 133, 244, 0.1);
    border-radius: 5px;
}

.current-location-display p {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.location-weather-info {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.snow-day-refresh-button {
    display: inline-flex;
    align-items: center;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.snow-day-refresh-button:hover {
    background-color: #e9ecef;
}

.location-error {
    padding: 10px;
    color: #d32f2f;
    background-color: rgba(211, 47, 47, 0.1);
    border-radius: 4px;
    margin-top: 10px;
}

.location-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4285f4;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form */
.snow-day-calculator-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 5px rgba(66, 133, 244, 0.3);
}

.form-group input.auto-filled,
.form-group select.auto-filled {
    background-color: #e8f0fe;
    border-color: #4285f4;
}

/* Buttons */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.snow-day-calculator-button {
    padding: 12px 20px;
    background-color: #000000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.snow-day-calculator-button:hover {
    background-color: #333333;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.snow-day-calculator-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.snow-day-calculator-button-reset {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.snow-day-calculator-button-reset:hover {
    background-color: #e5e5e5;
}

/* Results */
.snow-day-calculator-results {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-in-out;
}

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

.snow-day-calculator-results h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

/* Probability Meter */
.result-meter {
    margin-bottom: 20px;
}

.meter {
    height: 30px;
    position: relative;
    background: #f3f3f3;
    border-radius: 25px;
    padding: 5px;
    box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.meter > span {
    display: block;
    height: 100%;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    background-color: #4CAF50;
    position: relative;
    overflow: hidden;
    transition: width 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.meter > span:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, .2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, .2) 50%,
        rgba(255, 255, 255, .2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    overflow: hidden;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.probability-value {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-top: 10px;
}

.result-message {
    text-align: center;
    margin: 20px 0;
    font-size: 18px;
    font-weight: 500;
    padding: 10px;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.03);
}

.result-factors {
    margin-top: 20px;
}

.result-factors h4 {
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.result-factors ul {
    margin: 0;
    padding-left: 20px;
}

.result-factors li {
    margin-bottom: 8px;
    padding-left: 5px;
}

/* Data source notice */
.data-source-notice {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #777;
}

.data-source-notice a {
    color: #4285f4;
    text-decoration: none;
}

.data-source-notice a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .snow-day-calculator-container {
        padding: 15px;
        margin: 0 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .snow-day-calculator-button {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .probability-value {
        font-size: 18px;
    }
    
    .result-message {
        font-size: 16px;
    }
    
    .snow-day-location-button {
        width: 100%;
    }
}

/* Add some color variations for the probability meter based on the percentage */
.low-probability span {
    background-color: #4CAF50;
}

.medium-probability span {
    background-color: #FFC107;
}

.high-probability span {
    background-color: #F44336;
}
