/* Frost Date Lookup Tool - Complete Stylesheet */

/* COLOR CUSTOMIZATION */
:root {
    --frost-primary-color: #154e45;
    --frost-primary-dark: #1b5e20;
    --frost-primary-light: #4caf50;
    --frost-accent-color: #00acc1;
    --frost-error-color: #d32f2f;
    --frost-success-color: #388e3c;
    --frost-bg-light: #f5f5f5;
    --frost-border-color: #e0e0e0;
    --frost-text-dark: #212121;
    --frost-text-medium: #616161;
    --frost-text-light: #9e9e9e;
    --frost-spring-color: #81c784;
    --frost-fall-color: #ffb74d;
}

/* MAIN CONTAINER */
.frost-date-container {
    max-width: 1000px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* LOOKUP BOX */
.frost-date-lookup-box {
    background: var(--frost-bg-light);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 2px solid var(--frost-border-color);
    text-align: center;
}

.frost-date-lookup-box h2 {
    color: var(--frost-primary-color);
    margin-bottom: 10px;
    font-size: 2.2em;
    font-weight: 700;
}

.frost-subtitle {
    color: var(--frost-text-medium);
    margin-bottom: 25px;
    font-size: 1.1em;
    line-height: 1.5;
}

/* INPUT GROUP */
.frost-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#frost-zip-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

#frost-zip-input:focus {
    outline: none;
    border-color: var(--frost-primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* BUTTONS */
.frost-btn {
    padding: 15px 30px;
    font-size: 18px;
    background: var(--frost-primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
    font-family: inherit;
}

.frost-btn:hover {
    background: var(--frost-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.frost-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.frost-btn-secondary {
    padding: 12px 24px;
    font-size: 16px;
    background: white;
    color: var(--frost-primary-color);
    border: 2px solid var(--frost-primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 0 5px;
    font-family: inherit;
}

.frost-btn-secondary:hover {
    background: var(--frost-primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ERROR MESSAGE */
.frost-error {
    margin-top: 20px;
    padding: 15px 20px;
    background: #ffebee;
    color: var(--frost-error-color);
    border-radius: 6px;
    border-left: 4px solid var(--frost-error-color);
    animation: slideIn 0.3s ease;
}

.frost-error a {
    color: var(--frost-primary-color);
    text-decoration: underline;
    font-weight: 600;
}

/* NOAA TIMEOUT ERROR */
.frost-noaa-timeout {
    position: relative;
    z-index: 10;
    clear: both;
}

.frost-noaa-timeout strong {
    font-weight: 600;
}

/* RESULTS SECTION */
.frost-results-section {
    margin-top: 40px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    animation: slideIn 0.5s ease;
}

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

/* LOCATION HEADER */
.frost-location-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--frost-primary-color);
}

.frost-location-header h3 {
    color: var(--frost-primary-color);
    font-size: 2em;
    margin-bottom: 10px;
}

.frost-data-source {
    color: var(--frost-text-medium);
    font-size: 0.95em;
    font-style: italic;
}

/* TEMPERATURE TABS */
.frost-temp-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.frost-temp-tab {
    padding: 12px 24px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
    font-family: inherit;
    color: var(--frost-primary-color);
}

.frost-temp-tab:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.frost-temp-tab.active {
    background: var(--frost-primary-color);
    color: white;
    border-color: var(--frost-primary-color);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

/* FROST DATE TABLES */
.frost-tables-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.frost-table-wrapper {
    background: var(--frost-bg-light);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--frost-border-color);
}

.frost-table-wrapper h4 {
    color: var(--frost-primary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
    text-align: center;
}

.frost-date-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.frost-date-table thead {
    background: var(--frost-primary-color);
    color: white;
}

.frost-date-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.frost-date-table td {
    padding: 12px;
    border-bottom: 1px solid var(--frost-border-color);
}

.frost-date-table tbody tr:last-child td {
    border-bottom: none;
}

.frost-date-table tbody tr:hover {
    background: #f9f9f9;
}

.frost-date {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--frost-primary-color);
}

/* RISK BADGES */
.risk-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.risk-low {
    background: #c8e6c9;
    color: #2e7d32;
}

.risk-medium {
    background: #fff9c4;
    color: #f57f17;
}

.risk-high {
    background: #ffcdd2;
    color: #c62828;
}

/* GROWING SEASON BOX */
.growing-season-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    padding: 25px;
    border-radius: 10px;
    border: 2px solid var(--frost-primary-light);
    margin-bottom: 30px;
}

.growing-season-box h4 {
    color: var(--frost-primary-color);
    margin-bottom: 20px;
    font-size: 1.4em;
    text-align: center;
}

.season-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.season-stat {
    background: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.season-label {
    color: var(--frost-text-medium);
    font-size: 0.95em;
    margin-bottom: 8px;
}

.season-value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--frost-primary-color);
}

/* INFO BOX */
.frost-info-box {
    background: #e3f2fd;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid var(--frost-accent-color);
    margin-bottom: 30px;
}

.frost-info-box h4 {
    color: var(--frost-primary-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.frost-info-box ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.frost-info-box li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.frost-info-box li:last-child {
    border-bottom: none;
}

.frost-note {
    font-weight: 700;
    color: var(--frost-primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

/* ACTION BUTTONS */
.frost-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--frost-border-color);
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    .frost-tables-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .frost-date-lookup-box {
        padding: 25px 20px;
    }

    .frost-date-lookup-box h2 {
        font-size: 1.8em;
    }

    .frost-input-group {
        flex-direction: column;
        max-width: 100%;
    }

    .frost-results-section {
        padding: 25px 20px;
    }

    .frost-location-header h3 {
        font-size: 1.5em;
    }

    .frost-temp-tabs {
        gap: 8px;
    }

    .frost-temp-tab {
        padding: 10px 18px;
        font-size: 14px;
    }

    .frost-date-table {
        font-size: 14px;
    }

    .frost-date-table th,
    .frost-date-table td {
        padding: 10px 8px;
    }

    .season-stats {
        grid-template-columns: 1fr;
    }

    .frost-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .frost-btn-secondary {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .frost-date-lookup-box {
        padding: 20px 15px;
    }

    .frost-date-lookup-box h2 {
        font-size: 1.5em;
    }

    #frost-zip-input,
    .frost-btn {
        font-size: 16px;
        padding: 12px 18px;
    }

    .frost-results-section {
        padding: 20px 15px;
    }

    .frost-temp-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .frost-date-table {
        font-size: 13px;
    }

    .season-value {
        font-size: 1.5em;
    }

    .frost-info-box,
    .growing-season-box {
        padding: 20px 15px;
    }
}

/* PRINT STYLES */
@media print {
    .frost-date-lookup-box,
    .frost-temp-tabs,
    .frost-actions {
        display: none;
    }

    .frost-results-section {
        box-shadow: none;
        padding: 0;
    }

    .frost-tables-container {
        page-break-inside: avoid;
    }
}

/* ANIMATIONS */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.frost-date-table tbody tr:hover {
    animation: pulse 0.3s ease;
}

/* LOADING STATE */
.frost-loading {
    opacity: 0.6;
}

/* PROGRESS BAR / PATIENCE MESSAGE */
#frost-patience-message {
    position: relative;
    z-index: 10;
    clear: both;
    margin: 20px auto !important;
    max-width: 600px;
}

#frost-progress-bar {
    transition: width 0.5s ease;
}

#frost-progress-text {
    min-height: 20px;
}

/* ACCESSIBILITY */
.frost-btn:focus,
.frost-btn-secondary:focus,
.frost-temp-tab:focus,
#frost-zip-input:focus {
    outline: 3px solid var(--frost-accent-color);
    outline-offset: 2px;
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    :root {
        --frost-primary-color: #1b5e20;
        --frost-border-color: #000;
    }

    .frost-date-table {
        border: 2px solid #000;
    }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
