/* Veg Room Activity Specific Styles */

/* Strain selection grid */
.strain-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 40vw, 200px), 1fr));
    gap: var(--spacing-sm, 12px);
    margin: var(--spacing-md, 16px) 0;
    max-height: var(--safe-content-area, calc(100vh - 160px));
    overflow-y: auto;
}

.strain-btn {
    padding: var(--spacing-md, 16px);
    border: 2px solid #e0e0e0;
    border-radius: clamp(8px, 2vmin, 12px);
    background: white;
    min-height: var(--button-height-sm, 60px);
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.strain-btn:hover {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.05);
}

.strain-btn.selected {
    border-color: #007aff;
    background: #007aff;
    color: white;
}

/* Section selection styles */
.section-btn {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-btn:hover {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.05);
}

.section-btn.selected {
    border-color: #007aff;
    background: #007aff;
    color: white;
}

/* Selection footer - fixed to bottom */
.selection-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.selected-count {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

.selected-count span {
    font-weight: 600;
    color: #007aff;
}

/* Add bottom padding to screen to account for fixed footer */
.screen.has-fixed-footer {
    padding-bottom: 120px;
}

/* Scrollable content area when footer is fixed */
.scrollable-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-bottom: 1rem;
}

/* Table selection styles */
.slider-container {
    position: relative;
    margin: 2rem 0;
    text-align: center;
}

.table-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.table-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #007aff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.table-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #007aff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-value {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: #007aff;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    min-width: 60px;
}

.slider-value::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #007aff;
}

/* Position grid */
.position-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 2rem 0;
}

.position-btn {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.position-btn:hover {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.05);
}

.position-btn.selected {
    border-color: #007aff;
    background: #007aff;
    color: white;
}

/* Flowering room grid */
.flowering-room-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.flowering-room-btn {
    padding: 16px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flowering-room-btn:hover {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.05);
}

/* Health and pest pressure buttons */
.health-btn, .pest-btn, .foliar-btn {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.health-btn:hover, .pest-btn:hover, .foliar-btn:hover {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.05);
}

.health-btn .activity-icon,
.pest-btn .activity-icon,
.foliar-btn .activity-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* Action buttons for shaping/topping */
.action-btn {
    padding: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.action-btn:hover {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.05);
}

.action-btn .activity-icon {
    font-size: 2.5rem;
}

/* Health issue specific styles */
.health-issue-screen .notes-section {
    margin-bottom: 2rem;
}

.health-issue-screen .notes-section label {
    color: #d32f2f;
    font-weight: 600;
}

.health-issue-screen .notes-section textarea {
    border-color: #d32f2f;
}

.health-issue-screen .notes-section textarea:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* Keypad styles specific to veg activities */
.veg-activity .keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

.veg-activity .keypad-btn {
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.veg-activity .keypad-btn:hover {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.05);
}

.veg-activity .keypad-btn:active {
    transform: scale(0.95);
}

.veg-activity .keypad-full-span {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.veg-activity .clear-btn {
    background: #ff3b30;
    color: white;
    border-color: #ff3b30;
}

.veg-activity .clear-btn:hover {
    background: #d70015;
    border-color: #d70015;
}

/* Single value input for veg activities */
.veg-activity .single-value-input {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    background: white;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Activity summary in veg activities */
.veg-activity .activity-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
}

.veg-activity .activity-summary h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.veg-activity .summary-item {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.veg-activity .summary-item:last-child {
    border-bottom: none;
}

.veg-activity .summary-item strong {
    color: #666;
    font-weight: 500;
    min-width: 120px;
}

/* Responsive adjustments for veg activities */
@media (max-width: 768px) {
    .strain-selection-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .strain-btn {
        min-height: 50px;
        padding: 12px;
        font-size: 0.9rem;
    }

    .flowering-room-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .flowering-room-btn {
        min-height: 50px;
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    .health-btn, .pest-btn, .foliar-btn {
        min-height: 80px;
        padding: 16px;
        font-size: 1rem;
    }

    .action-btn {
        min-height: 100px;
        padding: 20px;
        font-size: 1.1rem;
    }

    .position-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .veg-activity .keypad {
        max-width: 260px;
        gap: 10px;
    }

    .veg-activity .keypad-btn {
        min-height: 50px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .strain-selection-grid {
        margin: 0.5rem 0;
    }

    .section-btn {
        min-height: 60px;
        padding: 16px;
        font-size: 1rem;
    }

    .slider-value {
        top: -40px;
        padding: 6px 12px;
        font-size: 1rem;
        min-width: 50px;
    }

    .health-btn .activity-icon,
    .pest-btn .activity-icon,
    .foliar-btn .activity-icon {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .action-btn .activity-icon {
        font-size: 2rem;
    }

    .veg-activity .single-value-input {
        font-size: 1.5rem;
        padding: 16px;
    }

    .veg-activity .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .veg-activity .summary-item strong {
        min-width: auto;
    }
}