/* Plant Tracking UI Styles - Dark Theme */
/* Based on AtomPot card design patterns */

@font-face {
    font-family: 'Geometria';
    src: url('/fonts/Geometria-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Container Styles */
.plants-container {
    font-family: 'Geometria', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.plants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.plants-header h1 {
    color: #E2E8F0;
    font-size: 32px;
    font-weight: 600;
    margin: 0;
}

/* Plants Grid */
.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Plant Card */
.plant-card {
    background-color: #292F38;
    border-radius: 13px;
    color: #E2E8F0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.plant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
}

.plant-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.plant-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #E2E8F0;
}

.plant-card-body {
    padding: 16px;
}

.plant-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

.plant-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plant-info-label {
    font-size: 12px;
    color: #A0AEC0;
}

.plant-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #E2E8F0;
}

.plant-card-notes {
    font-size: 13px;
    color: #CBD5E0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.5;
}

.plant-atompot-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(51, 187, 81, 0.2);
    color: #33BB51;
    padding: 6px 12px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
}

/* Stage Badges */
.plant-stage-badge {
    padding: 6px 12px;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.stage-seedling {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.stage-vegetative {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.stage-flowering {
    background-color: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.stage-harvest {
    background-color: rgba(156, 39, 176, 0.2);
    color: #9C27B0;
}

.stage-default {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

/* Loading and Empty States */
.loading-spinner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    color: #A0AEC0;
}

.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    text-align: center;
    color: #A0AEC0;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #E2E8F0;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: #A0AEC0;
    font-size: 16px;
    margin-bottom: 20px;
}

.empty-state-small {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
    color: #A0AEC0;
}

.empty-state-icon-small {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Plant Details Page */
.plant-details-container {
    font-family: 'Geometria', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.plant-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.plant-details-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.plant-details-header-left h1 {
    color: #E2E8F0;
    font-size: 32px;
    font-weight: 600;
    margin: 0;
}

.plant-details-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.plant-info-card {
    background-color: #292F38;
    border-radius: 13px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.plant-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.plant-info-item-large {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 13px;
}

.plant-info-item-large > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plant-notes-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.plant-notes-section h5 {
    color: #E2E8F0;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plant-notes-section p {
    color: #CBD5E0;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Modal Styles */
.plant-form-modal,
.watering-form-modal {
    font-family: 'Geometria', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.plant-form-modal-header,
.watering-form-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.plant-form-modal-title,
.watering-form-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #E2E8F0;
    margin: 0;
}

.plant-form-modal-content,
.watering-form-modal-content {
    padding: 24px;
}

.plant-form-field,
.watering-form-field {
    margin-bottom: 20px;
}

.plant-form-label,
.watering-form-label {
    display: block;
    font-size: 14px;
    color: #E2E8F0;
    margin-bottom: 8px;
    font-weight: 500;
}

.plant-form-input,
.plant-form-textarea,
.watering-form-input,
.watering-form-textarea {
    width: 100%;
    background-color: #3D4553;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    padding: 12px 16px;
    color: #E2E8F0;
    font-size: 14px;
    font-family: 'Geometria', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    outline: none;
}

.plant-form-input:focus,
.plant-form-textarea:focus,
.watering-form-input:focus,
.watering-form-textarea:focus {
    border-color: #33BB51;
}

/* Select-specific styling */
.plant-form-input select,
select.plant-form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23E2E8F0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.plant-form-input select::-ms-expand,
select.plant-form-input::-ms-expand {
    display: none;
}

/* Option styling for dark theme */
.plant-form-input option,
select.plant-form-input option {
    background-color: #3D4553;
    color: #E2E8F0;
    padding: 8px 12px;
}

.plant-form-input option:hover,
select.plant-form-input option:hover {
    background-color: #4A5568;
}

.plant-form-textarea,
.watering-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.plant-form-buttons,
.watering-form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.watering-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Watering List (Table) */
.watering-list {
    background-color: #292F38;
    border-radius: 13px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.watering-table {
    width: 100%;
    color: #E2E8F0;
}

.watering-table thead th {
    background-color: rgba(255, 255, 255, 0.05);
    color: #A0AEC0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.watering-table tbody td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.watering-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.watering-date {
    white-space: nowrap;
    color: #CBD5E0;
}

.watering-volume {
    font-weight: 600;
    color: #33BB51;
}

.watering-notes {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #A0AEC0;
}

.watering-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Watering Type Badges */
.watering-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.watering-type-regular {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.watering-type-feeding {
    background-color: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.watering-type-flushing {
    background-color: rgba(156, 39, 176, 0.2);
    color: #9C27B0;
}

.watering-type-default {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

/* Charts */
.watering-charts {
    background-color: #292F38;
    border-radius: 13px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.chart-container {
    margin-bottom: 40px;
}

.chart-container:last-child {
    margin-bottom: 0;
}

.chart-container h4 {
    color: #E2E8F0;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .plants-grid {
        grid-template-columns: 1fr;
    }

    .plant-details-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .plant-details-header-actions {
        width: 100%;
    }

    .plant-details-header-actions button {
        flex: 1;
    }

    .plant-info-grid {
        grid-template-columns: 1fr;
    }

    .watering-form-row {
        grid-template-columns: 1fr;
    }

    .watering-table {
        font-size: 12px;
    }

    .watering-table thead th,
    .watering-table tbody td {
        padding: 8px;
    }

    .chart-container h4 {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .plants-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .plants-header h1 {
        font-size: 24px;
    }

    .plant-details-header-left {
        flex-wrap: wrap;
    }

    .plant-details-header-left h1 {
        font-size: 24px;
    }

    /* Make table scrollable on mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .watering-table {
        min-width: 800px;
    }
}

/* Dark Theme Overrides for Bootstrap Components */
.modal-content {
    background-color: #3D4553 !important;
    border: none !important;
    border-radius: 13px !important;
    color: #E2E8F0;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tab Styling */
.nav-tabs {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.nav-tabs .nav-link {
    color: #A0AEC0;
    border: none;
    padding: 12px 20px;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: #E2E8F0;
    border: none;
}

.nav-tabs .nav-link.active {
    color: #33BB51;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #33BB51;
}

.tab-content {
    padding-top: 24px;
}

/* Validation Messages */
.text-danger {
    color: #E32828 !important;
    font-size: 12px;
    margin-top: 4px;
}

/* Custom Tabs for Plant Details */
.plant-tabs {
    background-color: #292F38;
    border-radius: 13px;
    margin-top: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.plant-tabs-header {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.02);
}

.plant-tab-button {
    flex: 1;
    background-color: transparent;
    border: none;
    color: #A0AEC0;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Geometria', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-bottom: 3px solid transparent;
}

.plant-tab-button:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #E2E8F0;
}

.plant-tab-button.active {
    background-color: rgba(51, 187, 81, 0.1);
    color: #33BB51;
    border-bottom-color: #33BB51;
}

.plant-tab-content {
    padding: 24px;
}

/* Chart Card Styles */
.chart-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    padding: 20px;
    margin-bottom: 20px;
}

.chart-card h5 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}
