/* Planting Calendar Container */
.planting-calendar-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.planting-calendar-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #154e45;
}

.planting-calendar-header h2 {
    color: #154e45;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
}

.planting-calendar-header p {
    color: #616161;
    font-size: 18px;
    line-height: 1.6;
}

/* Form Styling */
.planting-calendar-form {
    margin-bottom: 30px;
}

.form-row {
    margin-bottom: 30px;
}

.form-row label {
    display: block;
    margin-bottom: 10px;
    color: #154e45;
    font-weight: 600;
    font-size: 16px;
}

#calendar-zipcode {
    width: 100%;
    max-width: 300px;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid #c8e6c9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#calendar-zipcode:focus {
    outline: none;
    border-color: #154e45;
    box-shadow: 0 0 0 3px rgba(21, 78, 69, 0.1);
}

.zipcode-hint {
    margin-top: 8px;
    font-size: 14px;
    color: #757575;
    font-style: italic;
}

/* Plants Header */
.plants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.custom-plant-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-plant-btn:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

/* Custom Plant Form */
.custom-plant-form {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 3px solid #ff9800;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.custom-plant-form h3 {
    color: #e65100;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}

.custom-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.custom-form-field label {
    display: block;
    margin-bottom: 5px;
    color: #e65100;
    font-weight: 600;
    font-size: 14px;
}

.custom-form-field input,
.custom-form-field select,
.custom-form-field textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ffcc80;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.custom-form-field input:focus,
.custom-form-field select:focus,
.custom-form-field textarea:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.custom-form-field.full-width {
    grid-column: 1 / -1;
}

.custom-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-save {
    padding: 12px 24px;
    background: #154e45;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 78, 69, 0.3);
}

.btn-cancel {
    padding: 12px 24px;
    background: white;
    color: #616161;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    border-color: #ff9800;
    color: #ff9800;
    background: #fff3e0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom plant badge in list */
.custom-plant-checkbox {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ff9800 !important;
}

.custom-plant-checkbox .calendar-label {
    font-weight: 700;
}

.toggle-list-btn {
    padding: 10px 20px;
    background: #154e45;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-list-btn:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 78, 69, 0.3);
}

.toggle-list-btn.expanded .toggle-icon {
    transform: rotate(180deg);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

/* Plant Selection Container */
.plant-selection-container {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.plant-selection-container.collapsed {
    max-height: 0;
    padding: 0;
    opacity: 0;
}

.plant-selection-container.expanded {
    max-height: 2000px;
    opacity: 1;
}

/* Search Bar */
.plant-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

#calendar-plant-search {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#calendar-plant-search:focus {
    outline: none;
    border-color: #154e45;
    box-shadow: 0 0 0 3px rgba(21, 78, 69, 0.1);
}

.search-results-count {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    font-size: 14px;
    background: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

/* Category Tabs */
.calendar-category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.calendar-tab {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #616161;
    transition: all 0.3s ease;
}

.calendar-tab:hover {
    border-color: #154e45;
    color: #154e45;
}

.calendar-tab.active {
    background: #154e45;
    color: white;
    border-color: #154e45;
}

/* Selected Count Badge */
.selected-count-badge {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: #154e45;
}

#calendar-selected-count {
    font-size: 24px;
    color: #154e45;
}

/* Plant Selection Grid */
.calendar-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.calendar-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-checkbox:hover {
    border-color: #154e45;
    background: #f1f8f4;
}

.calendar-checkbox.checked {
    background: #e8f5e9;
    border-color: #154e45;
}

.calendar-checkbox input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.calendar-label {
    font-size: 14px;
    color: #424242;
    cursor: pointer;
}

/* Generate Button */
.calendar-generate-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #154e45 0%, #1b5e20 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(21, 78, 69, 0.3);
}

.calendar-generate-btn:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 78, 69, 0.4);
}

.calendar-generate-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 24px;
}

.btn-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
}

/* Loading State */
.calendar-loading {
    text-align: center;
    padding: 60px 20px;
}

.calendar-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #154e45;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results */
.calendar-results {
    margin-top: 40px;
}

.calendar-results-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.calendar-results-header h3 {
    color: #154e45;
    font-size: 28px;
    margin-bottom: 10px;
}

.calendar-results-header p {
    color: #616161;
    font-size: 16px;
}

/* Nearby ZIP Notice */
.nearby-zip-notice {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.nearby-zip-notice .notice-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}

.nearby-zip-notice .notice-content {
    flex: 1;
    color: #424242;
    line-height: 1.6;
}

.nearby-zip-notice .notice-content strong {
    color: #e65100;
}

/* Growing Methods Info Notice */
.growing-methods-notice {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.growing-methods-notice .notice-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}

.growing-methods-notice .notice-content {
    flex: 1;
    color: #424242;
    line-height: 1.6;
}

.growing-methods-notice .notice-content strong {
    color: #1565c0;
}

/* Frost Date Summary */
.frost-date-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.frost-item {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.frost-label {
    font-size: 14px;
    color: #154e45;
    font-weight: 600;
    margin-bottom: 8px;
}

.frost-value {
    font-size: 20px;
    color: #154e45;
    font-weight: 700;
}

/* Calendar Months */
.calendar-months {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.calendar-month-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.calendar-month-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.month-header {
    background: linear-gradient(135deg, #154e45 0%, #1b5e20 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.month-header h4 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.task-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.month-tasks {
    padding: 15px;
}

.calendar-task {
    padding: 15px;
    background: #fafafa;
    border-left: 4px solid #154e45;
    border-radius: 6px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.calendar-task:hover {
    background: #f1f8f4;
    transform: translateX(4px);
}

.calendar-task.fall {
    border-left-color: #ff9800;
}

.task-date {
    min-width: 60px;
    font-weight: 700;
    color: #154e45;
    font-size: 14px;
}

.task-date-inline {
    font-weight: 700;
    color: #154e45;
    font-size: 13px;
    margin-right: 4px;
}

.task-details {
    flex: 1;
}

.task-plant {
    font-weight: 700;
    color: #212121;
    margin-bottom: 4px;
    font-size: 15px;
}

.task-method {
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.task-method:last-child {
    margin-bottom: 0;
}

.transplant-method {
    border-left: 3px solid #154e45;
}

.direct-sow-method {
    border-left: 3px solid #2196f3;
}

.method-label {
    font-size: 12px;
    font-weight: 700;
    color: #154e45;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.task-divider {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #9e9e9e;
    padding: 8px 0;
    letter-spacing: 1px;
}

.task-action {
    font-size: 13px;
    color: #424242;
    margin-bottom: 6px;
    line-height: 1.6;
    padding-left: 4px;
}

.task-action:last-child {
    margin-bottom: 0;
}

.task-type {
    font-weight: 600;
    color: #212121;
}

.task-hint {
    font-size: 11px;
    color: #757575;
    font-style: italic;
    font-weight: 400;
}

/* Action Buttons */
.calendar-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.calendar-action-btn {
    padding: 14px 28px;
    background: white;
    color: #154e45;
    border: 2px solid #154e45;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-action-btn:hover {
    background: #f1f8f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 78, 69, 0.2);
}

.calendar-action-btn.primary {
    background: #154e45;
    color: white;
}

.calendar-action-btn.primary:hover {
    background: #1b5e20;
}

/* Responsive Design */
@media (max-width: 768px) {
    .planting-calendar-container {
        padding: 20px;
    }

    .planting-calendar-header h2 {
        font-size: 24px;
    }

    .plants-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .calendar-selection-grid {
        grid-template-columns: 1fr;
    }

    .calendar-months {
        grid-template-columns: 1fr;
    }

    .frost-date-summary {
        grid-template-columns: 1fr;
    }

    .calendar-actions {
        flex-direction: column;
    }

    .calendar-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .planting-calendar-form,
    .calendar-actions,
    .toggle-list-btn {
        display: none !important;
    }

    .calendar-month-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .month-header {
        background: #154e45 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Season Selection */
.season-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.season-option {
    position: relative;
    cursor: pointer;
    display: block;
}

.season-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.season-option .season-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #f5f5f5;
    border: 3px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.season-option input[type="radio"]:checked ~ .season-label {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #154e45;
    box-shadow: 0 4px 12px rgba(21, 78, 69, 0.15);
}

.season-option:hover .season-label {
    border-color: #154e45;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.season-icon {
    font-size: 32px;
    line-height: 1;
}

.season-label strong {
    display: block;
    color: #154e45;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.season-label small {
    display: block;
    color: #757575;
    font-size: 13px;
}

/* Planting Methods Notice */
.planting-methods-notice {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.planting-methods-notice .notice-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}

.planting-methods-notice .notice-content {
    flex: 1;
    color: #424242;
    line-height: 1.6;
}

.planting-methods-notice .notice-content strong {
    color: #e65100;
    font-weight: 700;
}

/* Planting Table */
.planting-table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.planting-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
    min-width: 900px;
}

.planting-table thead {
    background: linear-gradient(135deg, #154e45 0%, #1a6b5e 100%);
    color: white;
}

.planting-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #0d3730;
    color: #ffffff !important;
}

.planting-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.planting-table tbody tr:hover {
    background: #f5f5f5;
}

.planting-table tbody tr:last-child {
    border-bottom: none;
}

.planting-table td {
    padding: 16px 12px;
    vertical-align: middle;
    text-align: center;
}

.col-plant {
    width: 15%;
    font-weight: 600;
    color: #154e45;
    text-align: left;
    font-size: 15px;
}

.col-method {
    width: 15%;
    font-weight: 600;
    color: #154e45;
}

.col-harvest {
    width: 13%;
    font-weight: 600;
    color: #2e7d32;
}

.col-notes {
    width: 27%;
    color: #616161;
    line-height: 1.6;
    text-align: left;
    font-size: 13px;
}

.text-muted {
    color: #bdbdbd;
    font-style: italic;
    font-weight: 400;
}

/* Responsive Table */
@media (max-width: 1024px) {
    .planting-table {
        font-size: 12px;
        min-width: 800px;
    }

    .planting-table th,
    .planting-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 768px) {
    .planting-table {
        font-size: 11px;
        min-width: 700px;
    }

    .planting-table th,
    .planting-table td {
        padding: 10px 6px;
    }

    .season-selection {
        grid-template-columns: 1fr;
    }

    .col-plant {
        font-size: 13px;
    }

    .col-notes {
        font-size: 11px;
    }
}
