/* Commercial Mushroom Forms Styles */
.commercial-strain-modal,
.commercial-culture-modal {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.form-section {
    background: var(--bg-secondary, #f5f5f5);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.form-section h3 {
    color: var(--text-primary, #333);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color, #2e7d32);
}

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

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #333);
    font-size: 0.875rem;
}

.form-group label::after {
    content: attr(data-required);
    color: #e53e3e;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.625rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color, #2e7d32);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    padding: 0.25rem;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Temperature Range */
.temp-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.temp-range input {
    flex: 1;
}

.temp-range span {
    font-weight: 500;
    color: var(--text-secondary, #666);
}

/* Photo Upload Area */
.photo-upload-area {
    position: relative;
}

.photo-upload-area input[type="file"] {
    display: none;
}

.photo-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
    border: 2px dashed var(--border-color, #ddd);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary, #666);
}

.photo-upload-label:hover {
    background: var(--bg-hover, #f9f9f9);
    border-color: var(--primary-color, #2e7d32);
    color: var(--primary-color, #2e7d32);
}

/* Button Styles */
.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    margin-left: 0.5rem;
    background: var(--primary-color, #2e7d32);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-small:hover {
    background: var(--primary-dark, #1b5e20);
}

.btn-success {
    background: #4caf50;
}

.btn-success:hover {
    background: #45a049;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color, #ddd);
}

/* Validation States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #e53e3e;
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: #48bb78;
}

/* Required Field Indicator */
label:has(+ :required)::after {
    content: " *";
    color: #e53e3e;
}

/* Loading State */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.form-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--primary-color, #2e7d32);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .commercial-strain-modal,
    .commercial-culture-modal {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
}
